Skip to content

Commit

Permalink
Fix trigger order
Browse files Browse the repository at this point in the history
  • Loading branch information
kinoppyd committed May 15, 2024
1 parent c1192a2 commit a9b5769
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/admin/triggers_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ class TriggersController < AdminController
before_action :set_trigger, only: %i[show edit update]

def index
@triggers = Trigger.where('expires_at > ?', Time.current).or(Trigger.where(expires_at: nil))
@triggers = Trigger.where('expires_at > ?', Time.current)
.or(Trigger.where(expires_at: nil))
.order(description: :asc)
end

def show
Expand Down

0 comments on commit a9b5769

Please sign in to comment.