mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Refactoring alert message for conference controller
This commit is contained in:
parent
a8c9c2f2d4
commit
3d534ff7ba
2 changed files with 8 additions and 5 deletions
|
|
@ -21,7 +21,8 @@ class Admin::ConferenceController < ApplicationController
|
|||
notice: 'Conference was successfully created.')
|
||||
else
|
||||
redirect_to(new_admin_conference_path,
|
||||
flash: { error: @conference.errors.full_messages.join('! ') })
|
||||
alert: 'Creating the Conference failed.' \
|
||||
"#{@conference.errors.full_messages.join('. ')}.")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -32,9 +33,9 @@ class Admin::ConferenceController < ApplicationController
|
|||
redirect_to(admin_conference_path(id: @conference.short_title),
|
||||
notice: 'Conference was successfully updated.')
|
||||
else
|
||||
errors = @conference.errors.full_messages.join('! ')
|
||||
redirect_to(admin_conference_path(id: short_title),
|
||||
flash: { error: "Conference update failed. #{errors}" })
|
||||
alert: 'Updating conference failed. ' \
|
||||
"#{@conference.errors.full_messages.join('. ')}.")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue