mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-15 04:34:03 +00:00
Change all redirect_to(path) to redirect path for uniformity
This commit is contained in:
parent
434eb90b76
commit
19c54bd935
23 changed files with 128 additions and 125 deletions
|
|
@ -68,8 +68,8 @@ class ProposalController < ApplicationController
|
|||
return
|
||||
end
|
||||
|
||||
redirect_to(conference_program_proposal_index_path(conference_id: @conference.short_title),
|
||||
notice: 'Proposal was successfully updated.')
|
||||
redirect_to conference_program_proposal_index_path(conference_id: @conference.short_title),
|
||||
notice: 'Proposal was successfully updated.'
|
||||
end
|
||||
|
||||
def destroy
|
||||
|
|
@ -79,13 +79,13 @@ class ProposalController < ApplicationController
|
|||
begin
|
||||
@event.withdraw
|
||||
rescue Transitions::InvalidTransition
|
||||
redirect_to(:back, error: "Event can't be withdrawn")
|
||||
redirect_to :back, error: "Event can't be withdrawn"
|
||||
return
|
||||
end
|
||||
|
||||
@event.save(validate: false)
|
||||
redirect_to(conference_program_proposal_index_path(conference_id: @conference.short_title),
|
||||
notice: 'Proposal was successfully withdrawn.')
|
||||
redirect_to conference_program_proposal_index_path(conference_id: @conference.short_title),
|
||||
notice: 'Proposal was successfully withdrawn.'
|
||||
end
|
||||
|
||||
def confirm
|
||||
|
|
@ -95,7 +95,7 @@ class ProposalController < ApplicationController
|
|||
begin
|
||||
@event.confirm!
|
||||
rescue Transitions::InvalidTransition
|
||||
redirect_to(:back, error: "Event can't be confirmed")
|
||||
redirect_to :back, error: "Event can't be confirmed"
|
||||
return
|
||||
end
|
||||
|
||||
|
|
@ -106,11 +106,11 @@ class ProposalController < ApplicationController
|
|||
end
|
||||
|
||||
if @conference.user_registered?(current_user)
|
||||
redirect_to(conference_program_proposal_index_path(@conference.short_title),
|
||||
notice: 'The proposal was confirmed.')
|
||||
redirect_to conference_program_proposal_index_path(@conference.short_title),
|
||||
notice: 'The proposal was confirmed.'
|
||||
else
|
||||
redirect_to(new_conference_conference_registrations_path(conference_id: @conference.short_title),
|
||||
alert: 'The proposal was confirmed. Please register to attend the conference.')
|
||||
redirect_to new_conference_conference_registrations_path(conference_id: @conference.short_title),
|
||||
alert: 'The proposal was confirmed. Please register to attend the conference.'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -121,8 +121,8 @@ class ProposalController < ApplicationController
|
|||
begin
|
||||
@event.restart
|
||||
rescue Transitions::InvalidTransition
|
||||
redirect_to(conference_program_proposal_index_path(conference_id: @conference.short_title),
|
||||
error: "The proposal can't be re-submitted.")
|
||||
redirect_to conference_program_proposal_index_path(conference_id: @conference.short_title),
|
||||
error: "The proposal can't be re-submitted."
|
||||
return
|
||||
end
|
||||
|
||||
|
|
@ -132,8 +132,8 @@ class ProposalController < ApplicationController
|
|||
return
|
||||
end
|
||||
|
||||
redirect_to(conference_program_proposal_index_path(conference_id: @conference.short_title),
|
||||
notice: "The proposal was re-submitted. The #{@conference.short_title} organizers will review it again.")
|
||||
redirect_to conference_program_proposal_index_path(conference_id: @conference.short_title),
|
||||
notice: "The proposal was re-submitted. The #{@conference.short_title} organizers will review it again."
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue