Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
annotate
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
annotate
Commits
35c6dd44
Commit
35c6dd44
authored
Jun 20, 2010
by
fistfvck
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote branch 'robertwahler/master' into restart
Conflicts: History.txt annotate.gemspec lib/annotate/annotate_models.rb
parents
7494c64d
ff9d9ded
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
annotate_models.rb
lib/annotate/annotate_models.rb
+7
-1
No files found.
lib/annotate/annotate_models.rb
View file @
35c6dd44
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment