Module: LayoutOptions::InstanceMethods
- Defined in:
- lib/layout_options/layout_options.rb
Instance Method Summary collapse
-
#layout_options_selector ⇒ Object
:nodoc:.
Instance Method Details
#layout_options_selector ⇒ Object
:nodoc:
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/layout_options/layout_options.rb', line 62 def # :nodoc: = LayoutOptions::Storage[controller_name] || {} = .clone unless .empty? no_layout = .delete(:none) || [] no_layout = [no_layout] unless Array === no_layout action = action_name.to_sym .each do |key, values| values = [values] unless Array === values return key.to_s if values.include?(action) end no_layout.map! { |value| value.to_sym } return no_layout.include?(action) ? false : LayoutOptions.default_layout.to_s end |