mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Conflicts: app/controllers/admin/commercials_controller.rb app/controllers/admin/questions_controller.rb app/controllers/admin/users_controller.rb
22 lines
785 B
Ruby
22 lines
785 B
Ruby
module Admin
|
|
class SponsorshipLevelsController < Admin::BaseController
|
|
load_and_authorize_resource :conference, find_by: :short_title
|
|
authorize_resource through: :conference
|
|
|
|
def index
|
|
authorize! :index, SponsorshipLevel.new(conference_id: @conference.id)
|
|
end
|
|
|
|
def update
|
|
if @conference.update_attributes(params[:conference])
|
|
redirect_to(admin_conference_sponsorship_levels_path(
|
|
conference_id: @conference.short_title),
|
|
notice: 'Sponsorship levels were successfully updated.')
|
|
else
|
|
redirect_to(admin_conference_sponsorship_levels_path(
|
|
conference_id: @conference.short_title),
|
|
alert: 'Sponsorship levels update failed')
|
|
end
|
|
end
|
|
end
|
|
end
|