From 7865805636c79342155254b395147162544f88e3 Mon Sep 17 00:00:00 2001 From: Akshay Vishnoi Date: Sun, 17 Nov 2013 00:58:37 +0530 Subject: avoiding iterations and calling of underscore on all elements of array --- railties/lib/rails/generators/named_base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'railties/lib/rails') 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 -- cgit v1.2.3