Hi Nathan,

I have a partial layouts/_flash.haml with the following contents:

- [:notice, :warning, :error].each do |flash_type|
  - if flash[flash_type]
    .flash{ :id => flash_type }= flash[flash_type]

>From my layout view, I merely render it like this:

= render :partial => 'layouts/flash'

Those are the deprecation warnings:

.DEPRECATION WARNING: @flash is deprecated! Call flash.is_a? instead
of @flash.is_a?. Args: [Hash]  See http://www.rubyonrails.org/deprecation
for details. (called from rec_merge! at /my_rails_app/config/../vendor/
plugins/haml/lib/haml/engine.rb:713)
DEPRECATION WARNING: @flash is deprecated! Call flash.[] instead of
@flash.[]. Args: [:notice]  See http://www.rubyonrails.org/deprecation
for details. (called from _haml_render at (eval):8)
DEPRECATION WARNING: @flash is deprecated! Call flash.[] instead of
@flash.[]. Args: [:warning]  See http://www.rubyonrails.org/
deprecation for details. (called from _haml_render at (eval):8)
DEPRECATION WARNING: @flash is deprecated! Call flash.[] instead of
@flash.[]. Args: [:warning]  See http://www.rubyonrails.org/
deprecation for details. (called from _haml_render at (eval):12)
DEPRECATION WARNING: @flash is deprecated! Call flash.[] instead of
@flash.[]. Args: [:error]  See http://www.rubyonrails.org/deprecation
for details. (called from _haml_render at (eval):8)


Thanks for your time!

Moritz


On Feb 11, 8:12 am, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
> This is quite odd... Haml certainly doesn't filter stuff like that. Can
> I see a code sample where the problem occurs?
>
> - Nathan
>
> DerGuteMoritz wrote:
> > Hi everyone,
>
> > first off: haml is really cool! Problem: When using the flash hash in
> > my views, I get deprecation warnings thrown at me all the time cause
> > the parser seems to convert flash into @flash internally. Anything I'm
> > doing wrong? Note: This is true for stable and development version.
>
> > Moritz


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to