instance method
klass
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v3.0.20Signature
klass()
Returns the Ruby class that corresponds to the abstract data type.
Source
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 51
def klass
case type
when :integer then Fixnum
when :float then Float
when :decimal then BigDecimal
when :datetime then Time
when :date then Date
when :timestamp then Time
when :time then Time
when :text, :string then String
when :binary then String
when :boolean then Object
end
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb line 51
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::Column