diff options
author | Akshay Vishnoi <akshay.vishnoi@vinsol.com> | 2013-11-17 00:58:37 +0530 |
---|---|---|
committer | Akshay Vishnoi <akshay.vishnoi@vinsol.com> | 2013-11-17 00:58:37 +0530 |
commit | 7865805636c79342155254b395147162544f88e3 (patch) | |
tree | d0eeafc4673402b82f080f9e5075a055b6a0db65 /railties/lib/rails | |
parent | 4c76040e78f1c752d32ee802791fcc37c4c78b46 (diff) | |
download | rails-7865805636c79342155254b395147162544f88e3.tar.gz rails-7865805636c79342155254b395147162544f88e3.tar.bz2 rails-7865805636c79342155254b395147162544f88e3.zip |
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 |