Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

avoiding iterations and calling of underscore on all elements of array

  • Loading branch information...
commit 7865805636c79342155254b395147162544f88e3 1 parent 4c76040
Akshay Vishnoi akshay-vishnoi authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  railties/lib/rails/generators/named_base.rb
2  railties/lib/rails/generators/named_base.rb
View
@@ -90,7 +90,7 @@ def namespaced_class_path
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
Please sign in to comment.
Something went wrong with that request. Please try again.