lib/scaffolding_extensions/meta_model.rb
# Returns the column type for the given scaffolded column name.  Can be set via the instance
# variable @scaffold_column_types, a hash with the column name as a symbol key and the html
# type symbol as a value.  Associations have the :association type, and other types are looked
# up via columns_hash[column_name].type.  If no type is provided, :string is used by default.
Returns the column type for the given scaffolded column name.  Can be set via the instance
variable @scaffold_column_types, a hash with the column name as a symbol key and the html
type symbol as a value.  Associations have the :association type, and other types are looked
up via columns_hash[column_name].type.  If no type is provided, :string is used by default.
Returns the column type for the given scaffolded column name . Can be set via the instance variable @scaffold_column_types a hash with the column name as a symbol key and the html type symbol as a value . Associations have the : association type and other types are looked up via columns_hash [ column_name ] . type . If no type is provided : string is used by default .
def scaffold_column_type(column_name)
    @scaffold_column_types ||= {}
    @scaffold_column_types[column_name] ||= if type = SCAFFOLD_OPTIONS[:column_types][column_name]
      type
    elsif scaffold_association(column_name)
      :association
    elsif type = scaffold_table_column_type(column_name)
      (scaffold_convert_text_to_string && (type == :text)) ? :string : type
    else
      :string
    end
  end
def scaffold_column_type ( column_name ) @scaffold_column_types ||= { } @scaffold_column_types [ column_name ] ||= if type = SCAFFOLD_OPTIONS [ :column_types ] [ column_name ] type elsif scaffold_association ( column_name ) :association elsif type = scaffold_table_column_type ( column_name ) ( scaffold_convert_text_to_string && ( type == :text ) ) ? :string : type else :string end end
Returns the column type for the given scaffolded column name.
Returns the column type for the given scaffolded column name .
column_name
<not_specific>