mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +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
|
|
@ -13,8 +13,8 @@ module Admin
|
|||
def create
|
||||
@lodging = @conference.lodgings.new(lodging_params)
|
||||
if @lodging.save
|
||||
redirect_to(admin_conference_lodgings_path(conference_id: @conference.short_title),
|
||||
notice: 'Lodging successfully created.')
|
||||
redirect_to admin_conference_lodgings_path(conference_id: @conference.short_title),
|
||||
notice: 'Lodging successfully created.'
|
||||
else
|
||||
flash[:error] = "Creating Lodging failed: #{@lodging.errors.full_messages.join('. ')}."
|
||||
render :new
|
||||
|
|
@ -25,8 +25,8 @@ module Admin
|
|||
|
||||
def update
|
||||
if @lodging.update_attributes(lodging_params)
|
||||
redirect_to(admin_conference_lodgings_path(conference_id: @conference.short_title),
|
||||
notice: 'Lodging successfully updated.')
|
||||
redirect_to admin_conference_lodgings_path(conference_id: @conference.short_title),
|
||||
notice: 'Lodging successfully updated.'
|
||||
else
|
||||
flash[:error] = "Update Lodging failed: #{@lodging.errors.full_messages.join('. ')}."
|
||||
render :edit
|
||||
|
|
@ -35,12 +35,12 @@ module Admin
|
|||
|
||||
def destroy
|
||||
if @lodging.destroy
|
||||
redirect_to(admin_conference_lodgings_path(conference_id: @conference.short_title),
|
||||
notice: 'Lodging successfully deleted.')
|
||||
redirect_to admin_conference_lodgings_path(conference_id: @conference.short_title),
|
||||
notice: 'Lodging successfully deleted.'
|
||||
else
|
||||
redirect_to(admin_conference_lodgings_path(conference_id: @conference.short_title),
|
||||
redirect_to admin_conference_lodgings_path(conference_id: @conference.short_title),
|
||||
error: 'Deleting lodging failed.' \
|
||||
"#{@lodging.errors.full_messages.join('. ')}.")
|
||||
"#{@lodging.errors.full_messages.join('. ')}."
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue