File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 7
7
%w( db:migrate db:migrate:up db:migrate:down db:migrate:reset db:migrate:redo db:rollback ) . each do |task |
8
8
Rake ::Task [ task ] . enhance do
9
9
Rake ::Task [ Rake . application . top_level_tasks . last ] . enhance do
10
- Rake ::Task [ 'set_annotation_options' ] . invoke
10
+ annotation_options_task = if Rake ::Task . task_defined? ( 'app:set_annotation_options' )
11
+ 'app:set_annotation_options'
12
+ else
13
+ 'set_annotation_options'
14
+ end
15
+ Rake ::Task [ annotation_options_task ] . invoke
11
16
Annotate ::Migration . update_annotations
12
17
end
13
18
end
@@ -37,6 +42,8 @@ module Annotate
37
42
def self . update_routes
38
43
if Rake ::Task . task_defined? ( "annotate_routes" )
39
44
Rake ::Task [ "annotate_routes" ] . invoke
45
+ elsif Rake ::Task . task_defined? ( "app:annotate_routes" )
46
+ Rake ::Task [ "app:annotate_routes" ] . invoke
40
47
end
41
48
end
42
49
end
You can’t perform that action at this time.
0 commit comments