Class: Droom::EventsController
- Inherits:
-
EngineController
- Object
- ApplicationController
- EngineController
- Droom::EventsController
- Defined in:
- app/controllers/droom/events_controller.rb
Instance Method Summary collapse
- #calendar ⇒ Object
- #create ⇒ Object
- #destroy ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #new ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Instance Method Details
#calendar ⇒ Object
25 26 27 28 29 30 31 |
# File 'app/controllers/droom/events_controller.rb', line 25 def calendar respond_with @events do |format| format.js { render :partial => 'droom/events/calendar' } end end |
#create ⇒ Object
48 49 50 51 52 53 54 |
# File 'app/controllers/droom/events_controller.rb', line 48 def create if @event.save render :partial => "created" else respond_with @event end end |
#destroy ⇒ Object
69 70 71 72 |
# File 'app/controllers/droom/events_controller.rb', line 69 def destroy @event.destroy head :ok end |
#edit ⇒ Object
56 57 58 |
# File 'app/controllers/droom/events_controller.rb', line 56 def edit end |
#index ⇒ Object
17 18 19 20 21 22 23 |
# File 'app/controllers/droom/events_controller.rb', line 17 def index respond_with @events do |format| format.js { render :partial => 'droom/events/events' } end end |
#new ⇒ Object
44 45 46 |
# File 'app/controllers/droom/events_controller.rb', line 44 def new respond_with @event end |
#show ⇒ Object
33 34 35 36 37 38 39 40 41 42 |
# File 'app/controllers/droom/events_controller.rb', line 33 def show respond_with @event do |format| format.js { render :partial => 'droom/events/event' } format.zip { send_file @event.documents_zipped.path, :type => 'application/zip', :disposition => 'attachment', :filename => "#{@event.slug}.zip" } end end |
#update ⇒ Object
60 61 62 63 64 65 66 67 |
# File 'app/controllers/droom/events_controller.rb', line 60 def update @event.update_attributes(params[:event]) if @event.save render :partial => "event" else respond_with @event end end |