fix event type naming
This commit is contained in:
parent
748b33e7c2
commit
fd7f213178
6 changed files with 26 additions and 5 deletions
21
app/controllers/admin/event_types_controller.rb
Normal file
21
app/controllers/admin/event_types_controller.rb
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
module Admin
|
||||
class EventTypesController < Admin::BaseController
|
||||
authorize_resource
|
||||
load_and_authorize_resource :conference, find_by: :short_title
|
||||
|
||||
def show
|
||||
render :eventtypes
|
||||
end
|
||||
|
||||
def update
|
||||
@conference.update_attributes!(params[:conference])
|
||||
redirect_to(admin_conference_event_types_path(
|
||||
conference_id: @conference.short_title),
|
||||
notice: 'Event types were successfully updated.')
|
||||
rescue Exception => e
|
||||
redirect_to(admin_conference_event_types_path(
|
||||
conference_id: @conference.short_title),
|
||||
alert: "Event types update failed: #{e.message}")
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue