Rendering the data with different formats and one template

0 views
Skip to first unread message

Stan

unread,
Jun 7, 2009, 11:35:26 AM6/7/09
to merb
Hello,
I define a new .xhr format for ajax requests: Merb.add_mime_type
(:xhr, :to_html, %w[text/html])
The only reason I do this is because I want to have different layouts
for .html and .xhr formats, but the page contents are the same. Is
there any way to connect my *.html.haml and *.xhr.haml files instead
of just cloning them? It would be perfect if it used .xhr.haml file if
exists otherwise it would use html.haml file. Is it possible?

Stan
Reply all
Reply to author
Forward
0 new messages