Module: API::Helpers::EventsHelpers

Extended by:
Grape::API::Helpers
Defined in:
lib/api/helpers/events_helpers.rb

Instance Method Summary collapse

Instance Method Details

#find_events(source) ⇒ Object


26
27
28
# File 'lib/api/helpers/events_helpers.rb', line 26

def find_events(source)
  EventsFinder.new(params.merge(source: source, current_user: current_user, with_associations: true)).execute
end

#present_events(events) ⇒ Object


20
21
22
23
24
# File 'lib/api/helpers/events_helpers.rb', line 20

def present_events(events)
  events = paginate(events)

  present events, with: Entities::Event
end