aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2016-12-12 20:28:39 +0900
committerAkira Matsuda <ronnie@dio.jp>2016-12-12 20:49:25 +0900
commitf1878baad5e8f6bc49d1c37dd5afb917b79985f4 (patch)
tree63840d942c93dbc620f93b44af7a37bd5c2a7ad0 /railties/lib
parent0978293a945a11df46d573e74ad706f7bdf19dad (diff)
downloadrails-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')
-rw-r--r--railties/lib/rails/generators/rails/controller/controller_generator.rb4
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'