2014-08-06 21:14:00 +03:00
|
|
|
module Admin
|
|
|
|
|
class SupportersController < ApplicationController
|
|
|
|
|
before_filter :verify_organizer
|
2013-02-03 18:12:44 +01:00
|
|
|
|
2014-08-06 21:14:00 +03:00
|
|
|
def index
|
|
|
|
|
respond_to do |format|
|
|
|
|
|
format.html
|
|
|
|
|
format.json { render json: DatatableSupporters.new(@conference.supporter_registrations, view_context) }
|
|
|
|
|
end
|
2013-02-03 18:12:44 +01:00
|
|
|
end
|
|
|
|
|
|
2014-08-06 21:14:00 +03:00
|
|
|
def create
|
|
|
|
|
params[:supporter_registration][:conference_id] = @conference.id
|
|
|
|
|
SupporterRegistration.create!(params[:supporter_registration])
|
|
|
|
|
redirect_to(admin_conference_supporters_path(conference_id: @conference.short_title), notice: "Supporter added")
|
|
|
|
|
end
|
2013-02-03 18:12:44 +01:00
|
|
|
end
|
|
|
|
|
end
|