fix: code linter

This commit is contained in:
kbe
2025-09-17 16:52:05 +02:00
parent 6058023f30
commit 8acca705fa
4 changed files with 5 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
class Admin::PayoutsController < ApplicationController
before_action :authenticate_user!
before_action :ensure_admin!
before_action :set_payout, only: [:show, :approve, :reject, :mark_processing, :mark_completed, :mark_failed]
before_action :set_payout, only: [ :show, :approve, :reject, :mark_processing, :mark_completed, :mark_failed ]
def index
@pending_payouts = Payout.pending.includes(:user, :event).order(created_at: :asc)

View File

@@ -2,7 +2,7 @@ class Payout < ApplicationRecord
# === Relations ===
belongs_to :user
belongs_to :event
belongs_to :processed_by, class_name: 'User', optional: true
belongs_to :processed_by, class_name: "User", optional: true
# === Enums ===
enum :status, {
@@ -44,7 +44,7 @@ class Payout < ApplicationRecord
scope :processing, -> { where(status: :processing) }
scope :rejected, -> { where(status: :rejected) }
scope :failed, -> { where(status: :failed) }
scope :eligible_for_payout, -> { joins(:event).where(events: { state: 'published' }) }
scope :eligible_for_payout, -> { joins(:event).where(events: { state: "published" }) }
# === Callbacks ===
after_create :calculate_refunded_orders_count