Module: ActiveExt::ExtHelpers::ColumnBuilder
- Defined in:
- lib/active_ext/ext_helpers/column_builder.rb
Class Method Summary collapse
Class Method Details
.build_column(column) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/active_ext/ext_helpers/column_builder.rb', line 5 def self.build_column(column) column_hash = nil #if this is an association sql_type will be blank, use string column if column.sql_type.blank? || column.sql_type == NilClass column_hash = self.send("build_string_column", column.name, column.) else column_hash = self.send("build_#{column.sql_type.to_s}_column", column.name, column.) end column_hash end |