This module is mixed in if layout conditions are provided. This means that if no layout conditions are used, this method is not used

Methods
C
Instance Public methods
conditional_layout?()

Determines whether the current action has a layout by checking the action name against the :only and :except conditions set on the layout.

Returns

  • Boolean - True if the action has a layout, false otherwise.
     # File actionpack/lib/abstract_controller/layouts.rb, line 221
221:         def conditional_layout?
222:           return unless super
223: 
224:           conditions = _layout_conditions
225: 
226:           if only = conditions[:only]
227:             only.include?(action_name)
228:           elsif except = conditions[:except]
229:             !except.include?(action_name)
230:           else
231:             true
232:           end
233:         end