Sha256: 669f18122b9a60728bcc8d35dd0dffd6c8d8e45cfd5731ccd923fd1de6d60390

Contents?: true

Size: 356 Bytes

Versions: 20

Compression:

Stored size: 356 Bytes

Contents

require "active_record/attribute"

module ActiveRecord
  class Relation
    class QueryAttribute < Attribute # :nodoc:
      def type_cast(value)
        value
      end

      def value_for_database
        @value_for_database ||= super
      end

      def with_cast_value(value)
        QueryAttribute.new(name, value, type)
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
activerecord-5.1.7 lib/active_record/relation/query_attribute.rb
activerecord-5.1.7.rc1 lib/active_record/relation/query_attribute.rb
activerecord-5.1.6.2 lib/active_record/relation/query_attribute.rb
activerecord-5.1.6.1 lib/active_record/relation/query_attribute.rb
activerecord-5.1.6 lib/active_record/relation/query_attribute.rb
activerecord-5.1.5 lib/active_record/relation/query_attribute.rb
activerecord-5.1.5.rc1 lib/active_record/relation/query_attribute.rb
activerecord-5.1.4 lib/active_record/relation/query_attribute.rb
activerecord-5.1.4.rc1 lib/active_record/relation/query_attribute.rb
activerecord-5.1.3 lib/active_record/relation/query_attribute.rb
activerecord-5.1.3.rc3 lib/active_record/relation/query_attribute.rb
activerecord-5.1.3.rc2 lib/active_record/relation/query_attribute.rb
activerecord-5.1.3.rc1 lib/active_record/relation/query_attribute.rb
activerecord-5.1.2 lib/active_record/relation/query_attribute.rb
activerecord-5.1.2.rc1 lib/active_record/relation/query_attribute.rb
activerecord-5.1.1 lib/active_record/relation/query_attribute.rb
activerecord-5.1.0 lib/active_record/relation/query_attribute.rb
activerecord-5.1.0.rc2 lib/active_record/relation/query_attribute.rb
activerecord-5.1.0.rc1 lib/active_record/relation/query_attribute.rb
activerecord-5.1.0.beta1 lib/active_record/relation/query_attribute.rb