Sponsor dashboard added, with sponsor component for splash page
This commit is contained in:
parent
643b8b173a
commit
ea119a8158
36 changed files with 549 additions and 12 deletions
17
app/controllers/admin/sponsorships_controller.rb
Normal file
17
app/controllers/admin/sponsorships_controller.rb
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
class Admin::SponsorshipsController < ApplicationController
|
||||
before_filter :verify_organizer
|
||||
|
||||
def index
|
||||
end
|
||||
|
||||
def create
|
||||
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")
|
||||
else
|
||||
redirect_to(admin_conference_sponsorships_path(:conference_id => @conference.short_title),
|
||||
:alert => "Sponsorship creation failed.#{sponsorship.errors.full_messages.join('. ')}")
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue