diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2011-01-14 23:32:40 -0200 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-01-14 23:34:10 -0200 |
commit | d75ff73a72281cb834fef9aa3afc1413d5b00967 (patch) | |
tree | 365fffb29a2361ea3850ee026601c52efaa6e19d /railties/lib/rails | |
parent | 0aef847927ed2f9c3e3dca92207d9a62baa01b1a (diff) | |
download | rails-d75ff73a72281cb834fef9aa3afc1413d5b00967.tar.gz rails-d75ff73a72281cb834fef9aa3afc1413d5b00967.tar.bz2 rails-d75ff73a72281cb834fef9aa3afc1413d5b00967.zip |
plugin new generator should generate config/routes.rb file for full engines
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/plugin_new/templates/config/routes.rb | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb b/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb index 9461589ff5..7d40162e3b 100644 --- a/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb +++ b/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb @@ -44,7 +44,7 @@ module Rails end def config - template "config/routes.rb" if mountable? + template "config/routes.rb" if full? end def test diff --git a/railties/lib/rails/generators/rails/plugin_new/templates/config/routes.rb b/railties/lib/rails/generators/rails/plugin_new/templates/config/routes.rb index 42ddf380d8..8e158d5831 100644 --- a/railties/lib/rails/generators/rails/plugin_new/templates/config/routes.rb +++ b/railties/lib/rails/generators/rails/plugin_new/templates/config/routes.rb @@ -1,3 +1,6 @@ +<% if mountable? -%> <%= camelized %>::Engine.routes.draw do - +<% else -%> +Rails.application.routes.draw do +<% end -%> end |