Module: EventPresenter::InstanceMethods
- Defined in:
- app/presenters/event_presenter.rb
Instance Method Summary collapse
- #as_full_calendar_json ⇒ Object
- #as_json(options = {}) ⇒ Object
-
#as_widget_json(options = {}) ⇒ Object
JSON Methods.
- #to_s ⇒ Object
Instance Method Details
#as_full_calendar_json ⇒ Object
21 22 23 24 25 26 27 28 29 30 |
# File 'app/presenters/event_presenter.rb', line 21 def as_full_calendar_json shows.collect do |p| { :title => '', :start => p.datetime_local_to_event, :allDay => false, :color => '#077083', :id => p.id } end end |
#as_json(options = {}) ⇒ Object
32 33 34 |
# File 'app/presenters/event_presenter.rb', line 32 def as_json( = {}) super() end |
#as_widget_json(options = {}) ⇒ Object
JSON Methods
17 18 19 |
# File 'app/presenters/event_presenter.rb', line 17 def ( = {}) as_json(.merge(:methods => ['shows', 'charts', 'venue'])).merge('performances' => upcoming_public_shows.as_json) end |
#to_s ⇒ Object
12 13 14 |
# File 'app/presenters/event_presenter.rb', line 12 def to_s self.name || "" end |