diff options
Diffstat (limited to 'railties/lib/rails/generators/resource_helpers.rb')
-rw-r--r-- | railties/lib/rails/generators/resource_helpers.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/resource_helpers.rb b/railties/lib/rails/generators/resource_helpers.rb index 4669935156..3f84d76ae0 100644 --- a/railties/lib/rails/generators/resource_helpers.rb +++ b/railties/lib/rails/generators/resource_helpers.rb @@ -39,7 +39,7 @@ module Rails def assign_controller_names!(name) @controller_name = name @controller_class_path = name.include?('/') ? name.split('/') : name.split('::') - @controller_class_path.map! { |m| m.underscore } + @controller_class_path.map!(&:underscore) @controller_file_name = @controller_class_path.pop end @@ -48,7 +48,7 @@ module Rails end def controller_class_name - (controller_class_path + [controller_file_name]).map!{ |m| m.camelize }.join('::') + (controller_class_path + [controller_file_name]).map!(&:camelize).join('::') end def controller_i18n_scope |