Change all redirect_to(path) to redirect path for uniformity

This commit is contained in:
Nishanth Vijayan 2016-03-11 02:08:00 +05:30
parent 434eb90b76
commit 19c54bd935
23 changed files with 128 additions and 125 deletions

View file

@ -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