Module: Oasis::Layout::InstanceMethods
- Defined in:
- lib/oasis/layout.rb
Instance Method Summary collapse
-
#compute_oasis_layouts ⇒ Object
this method runs for every action, once #layout_for has been defined in a controller, once.
- #layouts ⇒ Object
Instance Method Details
#compute_oasis_layouts ⇒ Object
this method runs for every action, once #layout_for has been defined in a controller, once. There are a series of item types we support, defined below.
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/oasis/layout.rb', line 21 def compute_oasis_layouts context = layouts[@action_name.to_sym] case when context.is_a?(String); return context when context.is_a?(Symbol); return send(context) when context.is_a?(FalseClass); return false when context.is_a?(Proc); return context.call(request) else; return layouts[:default] end end |
#layouts ⇒ Object
14 15 16 |
# File 'lib/oasis/layout.rb', line 14 def layouts self.class.read_inheritable_attribute(:layouts) end |