Permalink
Browse files

Merge pull request #12917 from akshay-vishnoi/refactor

avoiding iterations and calling of underscore on all elements of array
  • Loading branch information...
2 parents d9b6abe + 7865805 commit 93e752cfae4564eff9827de7ee16a24b1f832c91 @rafaelfranca rafaelfranca committed Nov 16, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 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

0 comments on commit 93e752c

Please sign in to comment.