I'm using the mobile fu gem to do some user-agent detection, so that I can serve either .html or .mobile extension templates depending on the client,
Now, this part works really good, but I don't like that view folders become a bit cluttered with twice the files, ie.
app/views/profiles/show.mobile.haml
app/views/profiles/show.html.haml
app/views/profiles/edit.mobile.haml
app/views/profiles/edit.html.haml
etc, etc
what I'd like to have instead is:
app/views/profiles/html/show.html.haml
app/views/profiles/html/edit.html.haml
And
app/views/profiles/mobile/show.mobile.haml
app/views/profiles/mobile/edit.mobile.haml
And have Rails automatically look into the correct folder/directory for files depending on the Request. Is this possible to do?
Maybe this is something really easy to do, let me know if this is a behavior that comes out of the box..
Thank you