mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
s/redirect_to :back/redirect_back/
`redirect_to` has been removed in Rails 5.1 in favor of: ``` redirect_back(fallback_location: root_path) ```
This commit is contained in:
parent
ca32024268
commit
41d6fad7a5
5 changed files with 6 additions and 7 deletions
|
|
@ -104,7 +104,7 @@ class ProposalsController < ApplicationController
|
|||
@event.event_schedules.destroy_all
|
||||
end
|
||||
rescue Transitions::InvalidTransition
|
||||
redirect_to :back, error: "Event can't be withdrawn"
|
||||
redirect_back(fallback_location: root_path, error: "Event can't be withdrawn")
|
||||
return
|
||||
end
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ class ProposalsController < ApplicationController
|
|||
begin
|
||||
@event.confirm
|
||||
rescue Transitions::InvalidTransition
|
||||
redirect_to :back, error: "Event can't be confirmed"
|
||||
redirect_back(fallback_location: root_path, error: "Event can't be confirmed")
|
||||
return
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue