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
866a23a5
Commit
866a23a5
authored
8 years ago
by
Guillermo Guerrero Ibarra
Committed by
Cuong Tran
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Forgotten option hide_default_column_types (#431)
parent
d108ba8b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
annotate_models.rake
lib/tasks/annotate_models.rake
+3
-2
No files found.
lib/tasks/annotate_models.rake
View file @
866a23a5
...
...
@@ -10,7 +10,7 @@ task annotate_models: :environment do
require
"
#{
annotate_lib
}
/annotate/annotate_models"
require
"
#{
annotate_lib
}
/annotate/active_record_patch"
options
=
{
is_rake:
true
}
options
=
{
is_rake:
true
}
ENV
[
'position'
]
=
options
[
:position
]
=
Annotate
.
fallback
(
ENV
[
'position'
],
'before'
)
options
[
:position_in_class
]
=
Annotate
.
fallback
(
ENV
[
'position_in_class'
],
ENV
[
'position'
])
options
[
:position_in_fixture
]
=
Annotate
.
fallback
(
ENV
[
'position_in_fixture'
],
ENV
[
'position'
])
...
...
@@ -45,6 +45,7 @@ task annotate_models: :environment do
options
[
:ignore_columns
]
=
ENV
.
fetch
(
'ignore_columns'
,
nil
)
options
[
:ignore_routes
]
=
ENV
.
fetch
(
'ignore_routes'
,
nil
)
options
[
:hide_limit_column_types
]
=
Annotate
.
fallback
(
ENV
[
'hide_limit_column_types'
],
''
)
options
[
:hide_default_column_types
]
=
Annotate
.
fallback
(
ENV
[
'hide_default_column_types'
],
''
)
AnnotateModels
.
do_annotations
(
options
)
end
...
...
@@ -54,7 +55,7 @@ task remove_annotation: :environment do
require
"
#{
annotate_lib
}
/annotate/annotate_models"
require
"
#{
annotate_lib
}
/annotate/active_record_patch"
options
=
{
is_rake:
true
}
options
=
{
is_rake:
true
}
options
[
:model_dir
]
=
ENV
[
'model_dir'
]
options
[
:root_dir
]
=
ENV
[
'root_dir'
]
options
[
:require
]
=
ENV
[
'require'
]
?
ENV
[
'require'
].
split
(
','
)
:
[]
...
...
This diff is collapsed.
Click to expand it.
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