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

View File

@@ -17,6 +17,6 @@ class CreateTickets < ActiveRecord::Migration[8.0]
end
add_index :tickets, :qr_code, unique: true
add_index :tickets, [:status, :order_id]
add_index :tickets, [ :status, :order_id ]
end
end

View File

@@ -22,6 +22,6 @@ class CreatePayouts < ActiveRecord::Migration[8.0]
add_index :payouts, :status
add_index :payouts, :stripe_payout_id, unique: true
add_index :payouts, [:event_id, :status]
add_index :payouts, [ :event_id, :status ]
end
end