On Aug 28, 2008, at 3:40 AM, Antonin wrote: > On Aug 25, 11:24 pm, "s.ross" <[EMAIL PROTECTED]> wrote: > >> >> Thx. I believe it was related to the :layout => false part of the >> statement. Rails is still, IMO,nottemplate-language agnostic >> everywhere :( >> >> Anyhoo, my screw-up. > > Could you be a bit more specific, I have the same problem with some > rjs > and I world prefer not harcoding .html.haml > > I'm one Rails 2.0.2 too, did you test this on 2.1 and 2.1+ ?
I haven't tested on newer versions of Rails. The problem I experienced had to do with adding the (irrelevant) :layout => false in my render call. Rails should have consumed that spurious hash entry and done the right thing, but that's not what happened. There are several places in Rails where the path for a template is calculated. I haven't visited that code in a while, but the algorithm is subtly different in ActionController and ActionMailer. I'm not recalling it right now, but there were some other subtleties buried in there where the string '.rhtml' was hardcoded (now replaced with '.erb'). In any case, my problem was converting a render meant to be received as an ajax response (hence, :layout => false) to one that responds with json. I just forgot to remove the extraneous instruction. I wish I could be of more help. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Haml" 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/haml?hl=en -~----------~----~----~----~------~----~------~--~---
