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
|
|
@ -20,8 +20,8 @@ module Admin
|
|||
def create
|
||||
@track = @program.tracks.new(track_params)
|
||||
if @track.save
|
||||
redirect_to(admin_conference_program_tracks_path(conference_id: @conference.short_title),
|
||||
notice: 'Track successfully created.')
|
||||
redirect_to admin_conference_program_tracks_path(conference_id: @conference.short_title),
|
||||
notice: 'Track successfully created.'
|
||||
else
|
||||
flash[:error] = "Creating Track failed: #{@track.errors.full_messages.join('. ')}."
|
||||
render :new
|
||||
|
|
@ -32,8 +32,8 @@ module Admin
|
|||
|
||||
def update
|
||||
if @track.update_attributes(track_params)
|
||||
redirect_to(admin_conference_program_tracks_path(conference_id: @conference.short_title),
|
||||
notice: 'Track successfully updated.')
|
||||
redirect_to admin_conference_program_tracks_path(conference_id: @conference.short_title),
|
||||
notice: 'Track successfully updated.'
|
||||
else
|
||||
flash[:error] = "Track update failed: #{@track.errors.full_messages.join('. ')}."
|
||||
render :edit
|
||||
|
|
@ -42,11 +42,11 @@ module Admin
|
|||
|
||||
def destroy
|
||||
if @track.destroy
|
||||
redirect_to(admin_conference_program_tracks_path(conference_id: @conference.short_title),
|
||||
notice: 'Track successfully deleted.')
|
||||
redirect_to admin_conference_program_tracks_path(conference_id: @conference.short_title),
|
||||
notice: 'Track successfully deleted.'
|
||||
else
|
||||
redirect_to(admin_conference_program_tracks_path(conference_id: @conference.short_title),
|
||||
error: "Track couldn't be deleted. #{@track.errors.full_messages.join('. ')}.")
|
||||
redirect_to admin_conference_program_tracks_path(conference_id: @conference.short_title),
|
||||
error: "Track couldn't be deleted. #{@track.errors.full_messages.join('. ')}."
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue