Sha256: 1172d0f62a0482ad4e26b2c48ff2a0b3f9968525203814c11ea35ee832daa363

Contents?: true

Size: 419 Bytes

Versions: 12

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

12 entries across 12 versions & 1 rubygems

Version Path
faalis-0.26.3 app/models/faalis/concerns/assignment.rb
faalis-0.26.2 app/models/faalis/concerns/assignment.rb
faalis-0.26.1 app/models/faalis/concerns/assignment.rb
faalis-0.26.0 app/models/faalis/concerns/assignment.rb
faalis-0.25.1 app/models/faalis/concerns/assignment.rb
faalis-0.25.0 app/models/faalis/concerns/assignment.rb
faalis-0.24.4 app/models/faalis/concerns/assignment.rb
faalis-0.24.3 app/models/faalis/concerns/assignment.rb
faalis-0.24.2 app/models/faalis/concerns/assignment.rb
faalis-0.24.0 app/models/faalis/concerns/assignment.rb
faalis-0.23.0 app/models/faalis/concerns/assignment.rb
faalis-0.22.0 app/models/faalis/concerns/assignment.rb