fix event type naming

This commit is contained in:
Stella Rouzi 2014-07-10 11:12:32 +03:00
parent 748b33e7c2
commit fd7f213178
6 changed files with 26 additions and 5 deletions

View 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