Skip to content

Commit

Permalink
Merge pull request #203 from kufu/fixes/sort_admin_trigger
Browse files Browse the repository at this point in the history
Fix trigger order
  • Loading branch information
kinoppyd authored May 15, 2024
2 parents c1192a2 + a9b5769 commit 8e32bbc
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 8e32bbc

Please sign in to comment.