Skip to content

Commit b480742

Browse files
authored
load :set_annotation_options before running :annotate_routes (#803)
Make `annotate_routes` depend on `set_annotation_options` just as `annotate_models` does. Fixes #761.
1 parent 1956971 commit b480742

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/tasks/annotate_routes.rake

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
annotate_lib = File.expand_path(File.dirname(File.dirname(__FILE__)))
2+
3+
unless ENV['is_cli']
4+
task :set_annotation_options
5+
task annotate_routes: :set_annotation_options
6+
end
7+
18
desc "Adds the route map to routes.rb"
29
task :annotate_routes => :environment do
3-
annotate_lib = File.expand_path(File.dirname(File.dirname(__FILE__)))
410
require "#{annotate_lib}/annotate/annotate_routes"
511

612
options={}

0 commit comments

Comments
 (0)