I'm not using the HAML but overall I use the same stuff.

I have mime type set to mobile and that picks the appropriate template
and the layout. I override the _template_location() as well.

And I don't use the reload_templates. You should not IMHO.

Pavel

On Jun 9, 7:27 pm, Craig Muth <[email protected]> wrote:
> I'd like to use application.mobile.haml when someone goes to m.foo.com.
>
> Things I've tried...
>
> Setting self.content_type makes it look for a ...mobile.haml template and
> layout.  Only the layout needs to change for mobile devices, so this would
> mean I'd have to create a bunch of redundant ...mobile.haml templates that
> just include their ...html.haml counterparts.
>
> Overriding _template_location() in application.rb works fine (to make it use
> .mobile.haml only when appropriate) until you have c[:reload_templates] =
> true in production, and then it falls apart because it appears to only
> invoke _template_location() once and subsequently use a cached result.
>
> --Craig

-- 
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/merb?hl=en.

Reply via email to