diff options
author | José Valim <jose.valim@gmail.com> | 2010-06-28 17:09:09 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-28 17:09:09 +0200 |
commit | b5b42af33f446ca3de1d80f92b8c9138dbf6c05d (patch) | |
tree | 6b0bbfd60f19f0786659ff3d4a22316221774128 /railties/lib/rails | |
parent | 6dfa8d8e95ebd4b6bc177954173adf5cdd9b28b1 (diff) | |
download | rails-b5b42af33f446ca3de1d80f92b8c9138dbf6c05d.tar.gz rails-b5b42af33f446ca3de1d80f92b8c9138dbf6c05d.tar.bz2 rails-b5b42af33f446ca3de1d80f92b8c9138dbf6c05d.zip |
Make the sentinel flag for route a bit more robust.
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/generators/actions.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/actions.rb b/railties/lib/rails/generators/actions.rb index 7af329bbf0..199afbdc30 100644 --- a/railties/lib/rails/generators/actions.rb +++ b/railties/lib/rails/generators/actions.rb @@ -275,7 +275,7 @@ module Rails # def route(routing_code) log :route, routing_code - sentinel = "routes.draw do |map|" + sentinel = /\.routes\.draw do(\s*\|map\|)?\s*$/ in_root do inject_into_file 'config/routes.rb', "\n #{routing_code}\n", { :after => sentinel, :verbose => false } |