From 8acca705fae68e8197ae9af7e84a8cf7862333a1 Mon Sep 17 00:00:00 2001 From: kbe Date: Wed, 17 Sep 2025 16:52:05 +0200 Subject: [PATCH] fix: code linter --- app/controllers/admin/payouts_controller.rb | 2 +- app/models/payout.rb | 4 ++-- db/migrate/20250823171354_create_tickets.rb | 2 +- db/migrate/20250916221454_create_payouts.rb | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/admin/payouts_controller.rb b/app/controllers/admin/payouts_controller.rb index f148fa6..1831c79 100644 --- a/app/controllers/admin/payouts_controller.rb +++ b/app/controllers/admin/payouts_controller.rb @@ -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) diff --git a/app/models/payout.rb b/app/models/payout.rb index 77a39fc..be26660 100644 --- a/app/models/payout.rb +++ b/app/models/payout.rb @@ -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 diff --git a/db/migrate/20250823171354_create_tickets.rb b/db/migrate/20250823171354_create_tickets.rb index fd2d7d1..84855a6 100755 --- a/db/migrate/20250823171354_create_tickets.rb +++ b/db/migrate/20250823171354_create_tickets.rb @@ -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 diff --git a/db/migrate/20250916221454_create_payouts.rb b/db/migrate/20250916221454_create_payouts.rb index a13ceef..89275e3 100644 --- a/db/migrate/20250916221454_create_payouts.rb +++ b/db/migrate/20250916221454_create_payouts.rb @@ -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