Skip to content

Commit fea1f8c

Browse files
committed
Fix contest announcement delete redirection
1 parent 962e311 commit fea1f8c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/controllers/announcements_controller.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ class AnnouncementsController < InheritedResources::Base
22
actions :index, :create, :edit, :update, :destroy # no :show & :new
33
before_action :set_contest, only: [:create, :index]
44
before_action :set_announcement, only: [:edit, :update, :destroy]
5-
before_action :set_paths, only: [:create, :update]
5+
before_action :set_paths, only: [:create, :update, :destroy]
66
before_action :authenticate_admin!
77
layout :set_contest_layout, only: [:index, :edit]
88

@@ -22,6 +22,10 @@ def update
2222
update! { @page_path }
2323
end
2424

25+
def destroy
26+
destroy! { @page_path }
27+
end
28+
2529
private
2630

2731
def set_contest

0 commit comments

Comments
 (0)