Skip to content

Commit 19cc635

Browse files
authored
annotate --routes modifies only routes.rb
This change is a proposed solution to ctran#357 and an alternative to the already proposed solution ctran#361. In ctran#361 it is needed to call `annotate --routes --ignore-models` to achieve the same as in this change with only `annotate --routes`.
1 parent 6775e4a commit 19cc635

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/annotate.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def self.include_routes?
114114
end
115115

116116
def self.include_models?
117-
true
117+
ENV['routes'] !~ TRUE_RE
118118
end
119119

120120
def self.loaded_tasks=(val)

0 commit comments

Comments
 (0)