Class: EventsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/events_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
8
9
# File 'app/controllers/events_controller.rb', line 5

def index
  @date = Date.parse(params[:date]) rescue Date.today
  @calendar = Calendar.new(@date)
  present(@page)
end

#showObject



11
12
13
14
15
16
17
# File 'app/controllers/events_controller.rb', line 11

def show
  @event = Event.find(params[:id])

  # you can use meta fields from your model instead (e.g. browser_title)
  # by swapping @page for @event in the line below:
  present(@event)
end