diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-11-16 11:37:10 -0800 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-11-16 11:37:10 -0800 |
commit | 93e752cfae4564eff9827de7ee16a24b1f832c91 (patch) | |
tree | 0c4f6c9d8f07246d9ae4dbc8f0de182b10966dae /railties/lib/rails | |
parent | d9b6abe2b818cf8ec852dbf9b4cf8efda2da8eff (diff) | |
parent | 7865805636c79342155254b395147162544f88e3 (diff) | |
download | rails-93e752cfae4564eff9827de7ee16a24b1f832c91.tar.gz rails-93e752cfae4564eff9827de7ee16a24b1f832c91.tar.bz2 rails-93e752cfae4564eff9827de7ee16a24b1f832c91.zip |
Merge pull request #12917 from akshay-vishnoi/refactor
avoiding iterations and calling of underscore on all elements of array
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/generators/named_base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/named_base.rb b/railties/lib/rails/generators/named_base.rb index e712c747b0..5a92ab3e95 100644 --- a/railties/lib/rails/generators/named_base.rb +++ b/railties/lib/rails/generators/named_base.rb @@ -90,7 +90,7 @@ module Rails end def namespaced_path - @namespaced_path ||= namespace.name.split("::").map {|m| m.underscore }[0] + @namespaced_path ||= namespace.name.split("::").first.underscore end def class_name |