Sha256: 496c387dd84a5accd8b9c45894682bb6ec1f99b384acdfb6777ecaf233b80b32

Contents?: true

Size: 1.09 KB

Versions: 22

Compression:

Stored size: 1.09 KB

Contents

require 'ransack/adapters/mongoid/attributes/predications'
require 'ransack/adapters/mongoid/attributes/order_predications'

module Ransack
  module Adapters
    module Mongoid
      module Attributes
        class Attribute < Struct.new :relation, :name
          # include Arel::Expressions
          # include Arel::Predications
          # include Arel::AliasPredication
          # include Arel::OrderPredications
          # include Arel::Math

          include ::Ransack::Adapters::Mongoid::Attributes::Predications
          include ::Ransack::Adapters::Mongoid::Attributes::OrderPredications

          ###
          # Create a node for lowering this attribute
          def lower
            relation.lower self
          end
        end

        class String    < Attribute; end
        class Time      < Attribute; end
        class Boolean   < Attribute; end
        class Decimal   < Attribute; end
        class Float     < Attribute; end
        class Integer   < Attribute; end
        class Undefined < Attribute; end
      end

      Attribute = Attributes::Attribute
    end # Attributes
  end
end

Version data entries

22 entries across 22 versions & 3 rubygems

Version Path
ransack-1.8.10 lib/ransack/adapters/mongoid/attributes/attribute.rb
ransack-1.8.9 lib/ransack/adapters/mongoid/attributes/attribute.rb
ransack-1.8.8 lib/ransack/adapters/mongoid/attributes/attribute.rb
ransack-1.8.7 lib/ransack/adapters/mongoid/attributes/attribute.rb
ransack-1.8.6 lib/ransack/adapters/mongoid/attributes/attribute.rb
ransack-1.8.4 lib/ransack/adapters/mongoid/attributes/attribute.rb
ransack-1.8.3 lib/ransack/adapters/mongoid/attributes/attribute.rb
ransack-1.8.2 lib/ransack/adapters/mongoid/attributes/attribute.rb
ransack-1.8.1 lib/ransack/adapters/mongoid/attributes/attribute.rb
ransack-1.8.0 lib/ransack/adapters/mongoid/attributes/attribute.rb
ransack-1.7.0 lib/ransack/adapters/mongoid/attributes/attribute.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/ransack-1.6.6/lib/ransack/adapters/mongoid/attributes/attribute.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/ransack-1.6.6/lib/ransack/adapters/mongoid/attributes/attribute.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/ransack-1.6.6/lib/ransack/adapters/mongoid/attributes/attribute.rb
shoppe-paypal-1.1.0 vendor/bundle/ruby/2.1.0/gems/ransack-1.6.2/lib/ransack/adapters/mongoid/attributes/attribute.rb
ransack-1.6.6 lib/ransack/adapters/mongoid/attributes/attribute.rb
ransack-1.6.5 lib/ransack/adapters/mongoid/attributes/attribute.rb
ransack-1.6.4 lib/ransack/adapters/mongoid/attributes/attribute.rb
ransack-1.6.3 lib/ransack/adapters/mongoid/attributes/attribute.rb
ransack-1.6.2 lib/ransack/adapters/mongoid/attributes/attribute.rb