houndci fixes

This commit is contained in:
Gopesh Tulsyan 2014-05-26 15:43:19 +05:30
parent c67700e0ae
commit a0aa523122
11 changed files with 39 additions and 36 deletions

View file

@ -8,10 +8,12 @@ class Admin::SponsorshipsController < ApplicationController
params[:sponsorship_registration][:conference_id] = @conference.id
sponsorship = SponsorshipRegistration.new(params[:sponsorship_registration])
if sponsorship.save
redirect_to(admin_conference_sponsorships_path(:conference_id => @conference.short_title), :notice => "Sponsorship added")
redirect_to(admin_conference_sponsorships_path(
conference_id: @conference.short_title), notice: 'Sponsorship added')
else
redirect_to(admin_conference_sponsorships_path(:conference_id => @conference.short_title),
:alert => "Sponsorship creation failed.#{sponsorship.errors.full_messages.join('. ')}")
redirect_to(admin_conference_sponsorships_path(conference_id: @conference.short_title),
alert: 'Sponsorship creation failed.' \
"#{sponsorship.errors.full_messages.join('. ')}")
end
end
end