mix and match view engines?

13 views
Skip to first unread message

Tim Uckun

unread,
May 27, 2013, 11:04:34 PM5/27/13
to espresso-...@googlegroups.com
I have a layout.slim but I want to have one controller (or one action) use ERB. Is this possible?

Silviu Rusu

unread,
May 27, 2013, 11:53:09 PM5/27/13
to espresso-...@googlegroups.com
for controller:

class Foo < E
  engine :ERB
  # ...
end

and create base/views/layout.erb

for action:

class Foo < E

  setup :bar do
    engine :ERB
  end
  
end

all Foo actions will use Slim engine. bar action instead will use ERB engine

Tim Uckun

unread,
May 28, 2013, 8:35:01 AM5/28/13
to espresso-...@googlegroups.com
Ah great. That's very flexible.



--
You received this message because you are subscribed to the Google Groups "Espresso Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to espresso-framew...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages