diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/generators/actions.rb | 2 | ||||
-rw-r--r-- | railties/lib/generators/rails/resource/resource_generator.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/railties/lib/generators/actions.rb b/railties/lib/generators/actions.rb index f0d630e15a..080d374a2f 100644 --- a/railties/lib/generators/actions.rb +++ b/railties/lib/generators/actions.rb @@ -252,7 +252,7 @@ module Rails sentinel = "ActionController::Routing::Routes.draw do |map|" in_root do - inject_into_file 'config/routes.rb', "\n #{routing_code}", { :after => sentinel }, false + inject_into_file 'config/routes.rb', "\n #{routing_code}\n", { :after => sentinel }, false end end diff --git a/railties/lib/generators/rails/resource/resource_generator.rb b/railties/lib/generators/rails/resource/resource_generator.rb index 5fdf8c5b1b..938fd6298c 100644 --- a/railties/lib/generators/rails/resource/resource_generator.rb +++ b/railties/lib/generators/rails/resource/resource_generator.rb @@ -16,7 +16,7 @@ module Rails if klass args = [] args << class_name.pluralize - args.concat(options[:actions]) + args << options[:actions] say_status :invoke, options[:resource_controller], :blue klass.new(args, options.dup, _overrides_config).invoke(:all) @@ -26,7 +26,7 @@ module Rails end # TODO Add singleton support - def add_resource_routes + def add_resource_route route "map.resources :#{file_name.pluralize}" end |