store.rb 393 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
module ActiveRecord
  module Attributes
    class Store < Hash
      include ActiveRecord::Attributes::Typecasting
      include ActiveRecord::Attributes::Aliasing

      # Attributes not mapped to a column are handled using Type::Unknown,
      # which enables boolean typecasting for unmapped keys.
      def types
        @types ||= Hash.new(Type::Unknown.new)
      end

    end
  end
end