Sha256: 5e46369c9da30124cf42a4688372c68202080f239830d0529b0fedf9d80d74fb

Contents?: true

Size: 662 Bytes

Versions: 16

Compression:

Stored size: 662 Bytes

Contents

require_dependency "apidae/application_controller"

module Apidae
  class ApiController < ApplicationController

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

    def object
    end

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

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
apidae-0.4.5 app/controllers/apidae/api_controller.rb
apidae-0.4.4 app/controllers/apidae/api_controller.rb
apidae-0.4.3 app/controllers/apidae/api_controller.rb
apidae-0.4.2 app/controllers/apidae/api_controller.rb
apidae-0.4.1 app/controllers/apidae/api_controller.rb
apidae-0.4.0 app/controllers/apidae/api_controller.rb
apidae-0.3.6 app/controllers/apidae/api_controller.rb
apidae-0.3.5 app/controllers/apidae/api_controller.rb
apidae-0.3.4 app/controllers/apidae/api_controller.rb
apidae-0.3.3 app/controllers/apidae/api_controller.rb
apidae-0.3.2 app/controllers/apidae/api_controller.rb
apidae-0.3.1 app/controllers/apidae/api_controller.rb
apidae-0.3.0 app/controllers/apidae/api_controller.rb
apidae-0.2.9 app/controllers/apidae/api_controller.rb
apidae-0.2.8 app/controllers/apidae/api_controller.rb
apidae-0.2.7 app/controllers/apidae/api_controller.rb