mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Make action_has_layout? non-private
This commit is contained in:
parent
3deb60e6b4
commit
d8c7efece6
1 changed files with 4 additions and 4 deletions
|
@ -184,7 +184,7 @@ module AbstractController
|
|||
#
|
||||
# ==== Returns
|
||||
# Boolean:: True if the action has a layout, false otherwise.
|
||||
def _action_has_layout?
|
||||
def action_has_layout?
|
||||
conditions = _layout_conditions
|
||||
|
||||
if only = conditions[:only]
|
||||
|
@ -336,13 +336,13 @@ module AbstractController
|
|||
# Template:: The template object for the default layout (or nil)
|
||||
def _default_layout(require_layout = false)
|
||||
begin
|
||||
layout_name = _layout if _action_has_layout?
|
||||
layout_name = _layout if action_has_layout?
|
||||
rescue NameError => e
|
||||
raise NoMethodError,
|
||||
"You specified #{@_layout.inspect} as the layout, but no such method was found"
|
||||
end
|
||||
|
||||
if require_layout && _action_has_layout? && !layout_name
|
||||
if require_layout && action_has_layout? && !layout_name
|
||||
raise ArgumentError,
|
||||
"There was no default layout for #{self.class} in #{view_paths.inspect}"
|
||||
end
|
||||
|
@ -354,7 +354,7 @@ module AbstractController
|
|||
(options.keys & [:text, :inline, :partial]).empty? || options.key?(:layout)
|
||||
end
|
||||
|
||||
def _action_has_layout?
|
||||
def action_has_layout?
|
||||
true
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue