I fixed the partials oddness... I think it was because I called render :partial from a helper and not a template that it didn't get buffered so in production mode it just disappeared when the page was loaded a second time. Does that make sense? I mean, does what I'm telling you make sense. 'Cause I understand [after looking into engine.rb for a minute] what was going on. Nothing fishy just a bit odd [on my part].
Still loving the HAML goodness! RSL On 2/26/07, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote: > > Yeah, this is an odd issue with the way Rails handles default partial > variables and deprecated instance variables. If you render a partial called > "_name.haml" or "_name.rhtml", Rails looks in the controller for an instance > variable called "@name". If it exists, it tells the template engine to add > it as an instance variable for the template. Because there's a deprecated > "@headers" instance variable, Rails grabs that when you render a "headers" > partial. Then Haml calls is_a? on all the local variables it's told to > assign, which issues deprecation warnings because the variable is > deprecated. > > The upside is that you can safely ignore the warning... the issue should > just disappear when "@headers" is removed from Rails. > > I'm not sure why your partials are disappearing... can I see some example > code where that happens? > > - Nathan > > On 2/26/07, RSL <[EMAIL PROTECTED]> wrote: > > > > > > Yups! That was it. Now I have a wholly new, fun problem with some of > > my partials [well, only my menu partial] disappearing. > > > > RSL > > > > On Feb 26, 7:06 am, Nathan Weizenbaum < [EMAIL PROTECTED]> wrote: > > > Just on a hunch... do the warnings appear in a partial named > > > "_headers.haml"? If so, and you rename it to "_not_headers.haml", do > > the > > > warnings go away? > > > > > > - Nathan > > > > > > RSL wrote: > > > > I keep getting loads of errors during functional tests for the > > > > following: > > > > > > > DEPRECATION WARNING: @headers is deprecated! Call headers.is_a? > > > > instead of @headers.is_a?. Args: > > [Hash] Seehttp://www.rubyonrails.org/deprecation > > > > for details. (called from rec_merge! at > > /home/rsl/dev/temp/config/../ > > > > vendor/plugins/haml/lib/haml/engine.rb:727) > > > > > > > I tried running tests with --trace but got no better information > > than > > > > this. I don't see @headers called explicitly but apparently its in > > > > there somewhere. Hope this helps. > > > > > > > RSL > > > > > > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
