Merge pull request #52 from gopesht/fix_supporter_page

fixed supporter page redirect after creation
This commit is contained in:
Henne Vogelsang 2014-04-09 12:09:55 +02:00
commit 8f222db0bb
2 changed files with 2 additions and 3 deletions

View file

@ -11,7 +11,6 @@ class Admin::SupportersController < ApplicationController
def create
params[:supporter_registration][:conference_id] = @conference.id
supporter = SupporterRegistration.create!(params[:supporter_registration])
flash[:notice] = "Supporter added"
render :json => {"status" => "ok"}
redirect_to(admin_conference_supporters_path(:conference_id => @conference.short_title), :notice => "Supporter added")
end
end

View file

@ -1,5 +1,5 @@
#new-supporter-dialog
= semantic_form_for :supporter_registration, :remote => true, :html => {:id => "supporter-add-form"} do |f|
= semantic_form_for :supporter_registration, :html => {:id => "supporter-add-form"} do |f|
= f.input :name, :label => "Supporter Name"
= f.input :email, :label => "Supporter Email"
= f.input :supporter_level_id, :as => :select, :collection => @conference.supporter_levels