Permalink
Browse files

Rename method to a more obvious name

  • Loading branch information...
1 parent c863388 commit b0429f5e66b4e33f9d0ba7b066a3dbfdab68534c @wycats wycats committed Jul 12, 2009
@@ -99,7 +99,7 @@ def _layout(details) end
# the lookup to. By default, layout lookup is limited to the
# formats specified for the current request.
def _layout_for_name(name, details = {:formats => formats})
- name && _find_by_parts(name, details)
+ name && _find_layout(name, details)
end
# Take in the name and details and find a Template.
@@ -111,7 +111,7 @@ def _layout_for_name(name, details = {:formats => formats})
#
# ==== Returns
# Template:: A template object matching the name and details
- def _find_by_parts(name, details)
+ def _find_layout(name, details)
# TODO: Make prefix actually part of details in ViewPath#find_by_parts
prefix = details.key?(:prefix) ? details.delete(:prefix) : "layouts"
view_paths.find_by_parts(name, details, prefix)
@@ -114,7 +114,7 @@ def method_for_action(action_name)
super || (respond_to?(:method_missing) && "_handle_method_missing")
end
- def _find_by_parts(name, details)
+ def _find_layout(name, details)
details[:prefix] = nil if name =~ /\blayouts/
super
end
@@ -123,7 +123,7 @@ def _find_by_parts(name, details)
def _default_layout(details, require_layout = false)
super
rescue ActionView::MissingTemplate
- _find_by_parts(_layout({}), {})
+ _find_layout(_layout({}), {})
nil
end

0 comments on commit b0429f5

Please sign in to comment.