Methods

Class Index [+]

Quicksearch

Arel::Attributes

Public Class Methods

for(column) click to toggle source
 

Factory method to wrap a raw database column to an Arel Attribute.

    # File lib/arel/attributes.rb, line 7
 7:     def self.for column
 8:       case column.type
 9:       when :string, :text, :binary             then String
10:       when :integer                            then Integer
11:       when :float                              then Float
12:       when :decimal                            then Decimal
13:       when :date, :datetime, :timestamp, :time then Time
14:       when :boolean                            then Boolean
15:       else
16:         Undefined
17:       end
18:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.