Sha256: 629e1d3394abc3848b5c84d60bfc43a0426253698dc4d1a30797d1ea04ebb6cf

Contents?: true

Size: 419 Bytes

Versions: 23

Compression:

Stored size: 419 Bytes

Contents

module Faalis
  module Concerns
    # This **concern** provide the default query loading scope for model.
    # Using this, you can make queries like key=value in http request
    # and  Model.assignment(key: value) on you model.
    module Assignment

      def self.included(base)
        base.scope :assignment_query, ->(field, value) do
          base.where(field => value)
        end
      end

    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
faalis-2.2.0.pre.rc1 app/models/faalis/concerns/assignment.rb
faalis-2.2.1 app/models/faalis/concerns/assignment.rb
faalis-2.2.0 app/models/faalis/concerns/assignment.rb
faalis-2.1.1 app/models/faalis/concerns/assignment.rb
faalis-2.1.0 app/models/faalis/concerns/assignment.rb
faalis-2.0.8 app/models/faalis/concerns/assignment.rb
faalis-2.0.7 app/models/faalis/concerns/assignment.rb
faalis-2.0.5 app/models/faalis/concerns/assignment.rb
faalis-2.0.4 app/models/faalis/concerns/assignment.rb
faalis-2.0.3 app/models/faalis/concerns/assignment.rb
faalis-2.0.1 app/models/faalis/concerns/assignment.rb
faalis-2.0.0 app/models/faalis/concerns/assignment.rb
faalis-2.0.0.rc6 app/models/faalis/concerns/assignment.rb
faalis-2.0.0.rc5 app/models/faalis/concerns/assignment.rb
faalis-2.0.0.rc4 app/models/faalis/concerns/assignment.rb
faalis-2.0.0.rc3 app/models/faalis/concerns/assignment.rb
faalis-2.0.0.rc2 app/models/faalis/concerns/assignment.rb
faalis-1.0.0 app/models/faalis/concerns/assignment.rb
faalis-1.0.0.alpha4 app/models/faalis/concerns/assignment.rb
faalis-1.0.0.alpha3 app/models/faalis/concerns/assignment.rb