diff options
author | Akira Matsuda <ronnie@dio.jp> | 2016-12-12 20:28:39 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2016-12-12 20:49:25 +0900 |
commit | f1878baad5e8f6bc49d1c37dd5afb917b79985f4 (patch) | |
tree | 63840d942c93dbc620f93b44af7a37bd5c2a7ad0 /railties/lib/rails | |
parent | 0978293a945a11df46d573e74ad706f7bdf19dad (diff) | |
download | rails-f1878baad5e8f6bc49d1c37dd5afb917b79985f4.tar.gz rails-f1878baad5e8f6bc49d1c37dd5afb917b79985f4.tar.bz2 rails-f1878baad5e8f6bc49d1c37dd5afb917b79985f4.zip |
:nail_care:
Don't expect the caller of this method to know that the return value has an extra " "
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/generators/rails/controller/controller_generator.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/rails/controller/controller_generator.rb b/railties/lib/rails/generators/rails/controller/controller_generator.rb index ced3c85c00..4f60e44888 100644 --- a/railties/lib/rails/generators/rails/controller/controller_generator.rb +++ b/railties/lib/rails/generators/rails/controller/controller_generator.rb @@ -16,7 +16,7 @@ module Rails unless options[:skip_routes] actions.reverse_each do |action| # route prepends two spaces onto the front of the string that is passed, this corrects that. - route generate_routing_code(action)[2..-1] + route generate_routing_code(action) end end end @@ -40,7 +40,7 @@ module Rails # namespace :bar do namespace_ladder = regular_class_path.each_with_index.map do |ns, i| indent(" namespace :#{ns} do\n", i * 2) - end.join + end.join[2..-1] # Create route # get 'baz/index' |