Class: Apidae::ApiController

Inherits:
ApplicationController show all
Defined in:
app/controllers/apidae/api_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#apidae_user, #check_user_data!, #user_has_data?, #user_is_admin?

Instance Method Details

#agendaObject



17
18
19
20
21
22
23
# File 'app/controllers/apidae/api_controller.rb', line 17

def agenda
  @objects = []
  unless params[:selection_id].blank?
    objects_ids = Selection.find(params[:selection_id]).api_agenda(params[:from], params[:to])[:results]
    @objects = Obj.where(id: objects_ids)
  end
end

#objectObject



14
15
# File 'app/controllers/apidae/api_controller.rb', line 14

def object
end

#selectionObject



6
7
8
9
10
11
12
# File 'app/controllers/apidae/api_controller.rb', line 6

def selection
  @objects = []
  unless params[:selection_id].blank?
    objects_ids = Selection.find(params[:selection_id]).api_results[:results]
    @objects = Obj.where(id: objects_ids)
  end
end