Adds conference update errors to flash
- fix tests
This commit is contained in:
parent
e87e7e8fe6
commit
b94b5a4c75
2 changed files with 4 additions and 1 deletions
|
|
@ -32,8 +32,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),
|
||||
notice: 'Conference update failed.')
|
||||
flash: { error: "Conference update failed. #{errors}" })
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue