diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-11-29 09:04:47 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-11-29 09:04:47 -0200 |
commit | 390449ab8c55dacc08517bc270c6203bb1f50e02 (patch) | |
tree | e87455ea620155254511180cc1f08c5544ed195c /railties/lib/rails/generators/resource_helpers.rb | |
parent | 56e47cf66d2e3009b4032d0cd2ceb1a6e5e42573 (diff) | |
parent | d1374f99bf3090f3e659687c112ed0c5c0865cfb (diff) | |
download | rails-390449ab8c55dacc08517bc270c6203bb1f50e02.tar.gz rails-390449ab8c55dacc08517bc270c6203bb1f50e02.tar.bz2 rails-390449ab8c55dacc08517bc270c6203bb1f50e02.zip |
Merge pull request #16833 from sferik/symbol_to_proc
Pass symbol as an argument instead of a block
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 |