Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #12917 from akshay-vishnoi/refactor

avoiding iterations and calling of underscore on all elements of array
  • Loading branch information...
commit 93e752cfae4564eff9827de7ee16a24b1f832c91 2 parents d9b6abe + 7865805
@rafaelfranca rafaelfranca authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  railties/lib/rails/generators/named_base.rb
View
2  railties/lib/rails/generators/named_base.rb
@@ -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.