Sha256: b0a88366c13d84275aa12a232df7df04510ec6e64b88a6a344e5e14073783391

Contents?: true

Size: 422 Bytes

Versions: 11

Compression:

Stored size: 422 Bytes

Contents

module Quandl
module Cassinatra
module Concerns
  
module Search
  extend ActiveSupport::Concern

  included do

    include ScopeComposer::Model

    scope_composer_for :search

    search_helper :all, ->{ connection.where(attributes).fetch }
    search_helper :connection, -> { self.class.parent }

    search_scope.class_eval do
      delegate *Array.forwardable_methods, to: :all
    end

  end      
end

end
end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
quandl_cassinatra-0.2.2 lib/quandl/cassinatra/concerns/search.rb
quandl_cassinatra-0.2.1 lib/quandl/cassinatra/concerns/search.rb
quandl_cassinatra-0.2.0 lib/quandl/cassinatra/concerns/search.rb
quandl_cassinatra-0.1.16 lib/quandl/cassinatra/concerns/search.rb
quandl_cassinatra-0.1.15 lib/quandl/cassinatra/concerns/search.rb
quandl_cassinatra-0.1.14 lib/quandl/cassinatra/concerns/search.rb
quandl_cassinatra-0.1.13 lib/quandl/cassinatra/concerns/search.rb
quandl_cassinatra-0.1.11 lib/quandl/cassinatra/concerns/search.rb
quandl_cassinatra-0.1.10 lib/quandl/cassinatra/concerns/search.rb
quandl_cassinatra-0.1.9 lib/quandl/cassinatra/concerns/search.rb
quandl_cassinatra-0.1.8 lib/quandl/cassinatra/concerns/search.rb