Class: Eventable::EventsController
- Inherits:
-
EventableController
- Object
- ApplicationController
- EventableController
- Eventable::EventsController
- Defined in:
- app/controllers/eventable/events_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'app/controllers/eventable/events_controller.rb', line 9 def create if @event.update_attributes(params[:eventable_event]) flash[:notice] = 'Event was successfully created.' redirect_to(eventable_event_path(@event)) else render :action => "new" end end |
#destroy ⇒ Object
27 28 29 30 |
# File 'app/controllers/eventable/events_controller.rb', line 27 def destroy @event.destroy redirect_to(eventable_events_path) end |
#update ⇒ Object
18 19 20 21 22 23 24 25 |
# File 'app/controllers/eventable/events_controller.rb', line 18 def update if @event.update_attributes(params[:eventable_event]) flash[:notice] = 'Event was successfully updated.' redirect_to(eventable_event_path(@event)) else render :action => "edit" end end |