Hi,
I''m getting a warning about @flash since updating to Rails 1.2.1, but
as far as I can tell I''m not using @flash.
Warning is:
DEPRECATION WARNING: @flash is deprecated! Call flash.[] instead of
@flash.[]. Args: [:error] See http://www.rubyonrails.org/deprecation
for details. (called from
_run_rhtml_47app47views47shared47_flash46rhtml at
/Users/evansj/rails/config/../app/views/shared/_flash.rhtml:1)
plus another identical message for arg :notice at _flash.rhtml:4
_flash.rhtml just contains this:
<% if flash[:error] -%>
<div class="error" id="error"><%=
flash[:error]%></div>
<% end -%>
<% if flash[:notice] -%>
<div class="notice" id="notice"><%= flash[:notice]
%></div>
<script type="text/javascript">new
Effect.Highlight(''notice'',
{duration: 2.0});</script>
<% end -%>
A grep for @flash in my project finds nothing (performed from the
project root, so includes searching the plugins).
Any ideas?
Jon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
Jon, I had the same thing, I think I have isolated the problem and what I found is that if you have a partial called _flash.rhtml and put one reference to flash (f.e. <%= flash[:notice] %>) in there you get this warning. Everything works though and YOU know you don''t have @flash in there, so I wouldn''t worry about it too much. I did file a ticket though ... Tom Jon Evans wrote:> DEPRECATION WARNING: @flash is deprecated! Call flash.[] instead of > @flash.[]. Args: [:error] See http://www.rubyonrails.org/deprecation > for details. (called from > _run_rhtml_47app47views47shared47_flash46rhtml at > /Users/evansj/rails/config/../app/views/shared/_flash.rhtml:1)-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Tom, On Jan 22, 8:15 pm, Tom De grunt <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I had the same thing, I think I have isolated the problem and what I > found is that if you have a partial called _flash.rhtml and put one > reference to flash (f.e. <%= flash[:notice] %>) in there you get this > warning. > > Everything works though and YOU know you don''t have @flash in there, so > I wouldn''t worry about it too much. I did file a ticket though ...Thanks, I found your ticket (http://dev.rubyonrails.org/ticket/7303). There''s a comment there that says you can avoid the warning by using self.flash[:notice] in the view code. That seems to fix it. Jon --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
I just wanted to say your not the only ones with this issue. Its not a big deal, but a bit annoying... On Jan 22, 3:15 pm, Tom De grunt <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Jon, > > I had the same thing, I think I have isolated the problem and what I > found is that if you have a partial called _flash.rhtml and put one > reference to flash (f.e. <%= flash[:notice] %>) in there you get this > warning. > > Everything works though and YOU know you don''t have @flash in there, so > I wouldn''t worry about it too much. I did file a ticket though ... > > Tom > > Jon Evans wrote: > > DEPRECATION WARNING: @flash is deprecated! Call flash.[] instead of > > @flash.[]. Args: [:error] Seehttp://www.rubyonrails.org/deprecation > > for details. (called from > > _run_rhtml_47app47views47shared47_flash46rhtml at > > /Users/evansj/rails/config/../app/views/shared/_flash.rhtml:1)-- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---