mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Merge pull request #472 from ChrisBr/adds_error_message_to_questions
Adds error message to questions controller
This commit is contained in:
commit
e41fa41acf
1 changed files with 2 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ module Admin
|
|||
if @conference.save
|
||||
format.html { redirect_to admin_conference_questions_path, notice: 'Question was successfully created.' }
|
||||
else
|
||||
flash[:error] = "Oops, couldn't save. Question and answer(s) have titles?"
|
||||
flash[:error] = "Oops, couldn't save Question. #{@question.errors.full_messages.join('. ')}"
|
||||
format.html { redirect_to admin_conference_questions_path }
|
||||
end
|
||||
end
|
||||
|
|
@ -42,7 +42,7 @@ module Admin
|
|||
if @question.update_attributes(params[:question])
|
||||
redirect_to(admin_conference_questions_path(conference_id: @conference.short_title), notice: "Question '#{@question.title}' for #{@conference.short_title} successfully updated.")
|
||||
else
|
||||
redirect_to(admin_conference_questions_path(conference_id: @conference.short_title), notice: "Update of questions for #{@conference.short_title} failed.")
|
||||
redirect_to(admin_conference_questions_path(conference_id: @conference.short_title), notice: "Update of questions for #{@conference.short_title} failed. #{@question.errors.full_messages.join('. ')}")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue