Skip to content

Commit

Permalink
avoiding iterations and calling of underscore on all elements of array
Browse files Browse the repository at this point in the history
  • Loading branch information
Akshay Vishnoi committed Nov 16, 2013
1 parent 4c76040 commit 7865805
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion railties/lib/rails/generators/named_base.rb
Expand Up @@ -90,7 +90,7 @@ def namespaced_class_path
end end


def namespaced_path def namespaced_path
@namespaced_path ||= namespace.name.split("::").map {|m| m.underscore }[0] @namespaced_path ||= namespace.name.split("::").first.underscore
end end


def class_name def class_name
Expand Down

0 comments on commit 7865805

Please sign in to comment.