Syntax style + code groomming

This commit is contained in:
Stella Rouzi 2015-10-06 14:15:38 +03:00
parent eface6a91b
commit 759aa54689
16 changed files with 64 additions and 58 deletions

View file

@ -17,9 +17,9 @@ module Admin
@registration.update_attributes(registration_params)
if @registration.save
redirect_to admin_conference_registrations_path(@conference.short_title),
notice: 'Successfully updated registration!'
notice: "Successfully updated registration for #{@registration.user.email}!"
else
flash[:error] = "An error prohibited the Registration for #{@conference.title}: "\
flash[:error] = "An error prohibited the Registration for #{@registration.user.email}: "\
"#{@registration.errors.full_messages.join('. ')}."
render :edit
end
@ -56,7 +56,7 @@ module Admin
permit(
:conference_id, :arrival, :departure,
:volunteer,
vchoice_ids: [], qanswer_ids: [],
vchoice_ids: [], qanswer_ids: [], event_ids: [],
qanswers_attributes: [],
user_attributes: [
:id, :name, :tshirt, :mobile, :volunteer_experience, :languages,