Module: Irie::Extensions::SmartLayout
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/irie/extensions/smart_layout.rb
Overview
Specify layout: false unless request.format.html?
Instance Method Summary collapse
Instance Method Details
#index(options = {}, &block) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/irie/extensions/smart_layout.rb', line 12 def index(={}, &block) if request.format.html? ::Irie.logger.debug("[Irie] Irie::Extensions::SmartLayout.index: not merging layout:false into options because not html") if ::Irie.debug? else ::Irie.logger.debug("[Irie] Irie::Extensions::SmartLayout.index: merging layout:false into options because format.html? is truthy") if ::Irie.debug? .merge!({layout: false}) unless request.format.html? end super(, &block) end |