Adds conference update errors to flash

- fix tests
This commit is contained in:
Chrisbr 2014-05-12 21:15:33 +02:00
parent e87e7e8fe6
commit b94b5a4c75
2 changed files with 4 additions and 1 deletions

View file

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