fix: code linter
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user