Skip to content

Commit

Permalink
Put index action at the top
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsuda committed Mar 6, 2025
1 parent 232f8f7 commit d954b27
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/controllers/admin/events_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
class Admin::EventsController < Admin::ApplicationController
before_action :require_event, only: [:destroy, :archive, :unarchive]

def index
@events = Event.order(:archived, id: :desc)
end

def new
@event = Event.new
end
Expand Down Expand Up @@ -39,9 +43,4 @@ def unarchive
end
redirect_to admin_events_path
end

def index
@events = Event.order(:archived, id: :desc)
end

end

0 comments on commit d954b27

Please sign in to comment.