Commit 35c6dd44 by fistfvck

Merge remote branch 'robertwahler/master' into restart

Conflicts: History.txt annotate.gemspec lib/annotate/annotate_models.rb
parents 7494c64d ff9d9ded
......@@ -19,6 +19,10 @@ module AnnotateModels
FACTORY_GIRL_TEST_DIR = File.join("test", "factories")
FACTORY_GIRL_SPEC_DIR = File.join("spec", "factories")
# Don't show limit (#) on these column types
# Example: show "integer" instead of "integer(4)"
NO_LIMIT_COL_TYPES = ["integer", "boolean"]
def model_dir
@model_dir || "app/models"
end
......@@ -60,7 +64,9 @@ module AnnotateModels
if col_type == "decimal"
col_type << "(#{col.precision}, #{col.scale})"
else
col_type << "(#{col.limit})" if col.limit
if (col.limit)
col_type << "(#{col.limit})" unless NO_LIMIT_COL_TYPES.include?(col_type)
end
end
# Check out if we got a geometric column
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment