diff options
author | José Valim <jose.valim@gmail.com> | 2009-06-28 19:46:34 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-06-28 19:46:34 +0200 |
commit | 9413dba432b11d86b80449ca7b959b32ecb0844c (patch) | |
tree | 13eab65aefcc7cc4550f70a29da32b560b358641 /railties/lib | |
parent | 9068bc05b8c5a1f2a0ad6959cb897d5831046d0a (diff) | |
download | rails-9413dba432b11d86b80449ca7b959b32ecb0844c.tar.gz rails-9413dba432b11d86b80449ca7b959b32ecb0844c.tar.bz2 rails-9413dba432b11d86b80449ca7b959b32ecb0844c.zip |
Added tessts for resources generator.
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 |