module AttributeColumn
Constants
- VERSION
Public Class Methods
generate(options)
click to toggle source
# File lib/attribute_column.rb, line 13 def self.generate(options) type = options[:type] attribute = Attribute.new(options) case type when :string attribute.limit = 255 when :integer, :float attribute.number = true end attribute end
Public Instance Methods
column_for_attribute(attribute)
click to toggle source
# File lib/attribute_column.rb, line 35 def column_for_attribute(attribute) self.class.columns_hash[attribute.to_sym] end