aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-11-16 11:37:10 -0800
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-11-16 11:37:10 -0800
commit93e752cfae4564eff9827de7ee16a24b1f832c91 (patch)
tree0c4f6c9d8f07246d9ae4dbc8f0de182b10966dae /railties/lib/rails
parentd9b6abe2b818cf8ec852dbf9b4cf8efda2da8eff (diff)
parent7865805636c79342155254b395147162544f88e3 (diff)
downloadrails-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.rb2
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