mix and match view engines?

12 katselukertaa
Siirry ensimmäiseen lukemattomaan viestiin

Tim Uckun

lukematon,
27.5.2013 klo 23.04.3427.5.2013
vastaanottaja 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

lukematon,
27.5.2013 klo 23.53.0927.5.2013
vastaanottaja 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

lukematon,
28.5.2013 klo 8.35.0128.5.2013
vastaanottaja 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.
 
 

Vastaa kaikille
Vastaa kirjoittajalle
Välitä
0 uutta viestiä