Skip to content

Commit

Permalink
expand mulasgn for enhancing readability
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Jan 31, 2011
1 parent 2e11213 commit 4ccf831
Showing 1 changed file with 9 additions and 6 deletions.
Expand Up @@ -28,12 +28,15 @@ module Format
# It will be mapped to one of the standard Rails SQL types in the <tt>type</tt> attribute.
# +null+ determines if this column allows +NULL+ values.
def initialize(name, default, sql_type = nil, null = true)
@name, @sql_type, @null = name, sql_type, null
@limit, @precision, @scale = extract_limit(sql_type), extract_precision(sql_type), extract_scale(sql_type)
@type = simplified_type(sql_type)
@default = extract_default(default)

@primary = nil
@name = name
@sql_type = sql_type
@null = null
@limit = extract_limit(sql_type)
@precision = extract_precision(sql_type)
@scale = extract_scale(sql_type)
@type = simplified_type(sql_type)
@default = extract_default(default)
@primary = nil
end

# Returns +true+ if the column is either of type string or text.
Expand Down

0 comments on commit 4ccf831

Please sign in to comment.