# DEPRECATION WARNING -- fine, but I'm not doing that

**URL:** <https://www.ruby-forum.com/t/deprecation-warning-fine-but-im-not-doing-that/111460>\
**Category:** Rails\
**Created:** [August 7, 2007, 4:06pm UTC](https://www.ruby-forum.com/t/deprecation-warning-fine-but-im-not-doing-that/111460 "2007-08-07T16:06:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hugh\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/d2c977/32.png) [@Hugh\_S](https://www.ruby-forum.com/u/Hugh_S)\
**Post date:** [August 7, 2007, 4:06pm UTC](https://www.ruby-forum.com/t/deprecation-warning-fine-but-im-not-doing-that/111460/1 "2007-08-07T16:06:09Z")

</div>

When I run my functional tests, I get (pasted from cygwin):

Started  
.E…DEPRECATION WARNING: @flash is deprecated! Call flash.[] instead of  
@flash.[  
]. Args: [:note] See [Ruby on Rails — A web-app framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern.](http://www.rubyonrails.org/deprecation) for  
details. (called  
from \_run\_rhtml\_47app47views47admin47\_flash46rhtml at  
/home/hgs/aeg\_intranet/cse  
store/config/…/app/views/admin/\_flash.rhtml:2)  
DEPRECATION WARNING: @flash is deprecated! Call flash.keys instead of  
@flash.keys  
. Args: [] See [Ruby on Rails — A web-app framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern.](http://www.rubyonrails.org/deprecation) for details.  
(called from  
\_run\_rhtml\_47app47views47admin47\_flash46rhtml at  
/home/hgs/aeg\_intranet/csestore/  
config/…/app/views/admin/\_flash.rhtml:5)  
DEPRECATION WARNING: @flash is deprecated! Call flash.each\_pair instead  
of @flash  
.each\_pair. Args: [] See [Ruby on Rails — A web-app framework that includes everything needed to create database-backed web applications according to the Model-View-Controller (MVC) pattern.](http://www.rubyonrails.org/deprecation) for  
details. (ca  
lled from \_run\_rhtml\_47app47views47admin47\_flash46rhtml at  
/home/hgs/aeg\_intranet  
/csestore/config/…/app/views/admin/\_flash.rhtml:7)

And when I look at the file I have:  
------8\<----------------------------------------  
  
\<% if flash[:note] && ! flash[:note].empty? -%\>

Flash note:

\<%= h(flash[:note]) %\>
  
\<% end -%\>  
\<% if ! flash.keys.empty? -%\>  

Flash:

  

\<% flash.each\_pair{|k,v| %\>

\<%= k.to\_s + ":  
" + v.to\_s -%\>

  
\<%} %\>
  
\<% end %\>  
  
------8\<----------------------------------------

What @ signs? I’ve just taken them out. What’s the correct way to get  
rid of these warnings? I’m using the flash stuff for debugging at the  
moment,  
but nonetheless I’d like to do this right.

This is under Rails 1.2.3 on cygwin (with MySQL).

```
    Thank you,
    Hugh

```

---

<div class="post-metadata">

**Author:** ![Hugh\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/d2c977/32.png) [@Hugh\_S](https://www.ruby-forum.com/u/Hugh_S)\
**Post date:** [August 9, 2007, 11:40pm UTC](https://www.ruby-forum.com/t/deprecation-warning-fine-but-im-not-doing-that/111460/2 "2007-08-09T23:40:10Z")

</div>

See [http://dev.rubyonrails.org/ticket/7553](http://dev.rubyonrails.org/ticket/7553) . The simplest fix is just  
to rename your \_flash partial to something else.

Mike G.

> **[A Fresh Cup](https://afreshcup.com/)**
>
> Mike Gunderloy's daily list of software development links. Centered on Rails, but covers everything a web developer might be interested in.

---

<div class="post-metadata">

**Author:** ![Hugh\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/d2c977/32.png) [@Hugh\_S](https://www.ruby-forum.com/u/Hugh_S)\
**Post date:** [August 13, 2007, 12:22pm UTC](https://www.ruby-forum.com/t/deprecation-warning-fine-but-im-not-doing-that/111460/3 "2007-08-13T12:22:31Z")

</div>

On Thu, 9 Aug 2007, removed\_email\_address@domain.invalid wrote:

> See [http://dev.rubyonrails.org/ticket/7553](http://dev.rubyonrails.org/ticket/7553) . The simplest fix is just  
> to rename your \_flash partial to something else.

The mail server has been off for a while, so hence late response.

This is not the problem. I still have \_flash.rhtml, but don’t get this  
now. I think it expanded this in other partials that were expanded,  
because  
having fixed those the warning has gone.

```
    Thank you
    Hugh

```

---

<div class="post-metadata">

**Author:** ![Hugh\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/d2c977/32.png) [@Hugh\_S](https://www.ruby-forum.com/u/Hugh_S)\
**Post date:** [August 15, 2007, 8:32am UTC](https://www.ruby-forum.com/t/deprecation-warning-fine-but-im-not-doing-that/111460/4 "2007-08-15T08:32:40Z")

</div>

this can also be fixed by passing object: =\> flash in with your partial.

---

<div class="post-metadata">

**Author:** ![Hugh\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/d2c977/32.png) [@Hugh\_S](https://www.ruby-forum.com/u/Hugh_S)\
**Post date:** [August 15, 2007, 12:50pm UTC](https://www.ruby-forum.com/t/deprecation-warning-fine-but-im-not-doing-that/111460/5 "2007-08-15T12:50:13Z")

</div>

On Wed, 15 Aug 2007, Scott A s wrote:

> this can also be fixed by passing object: =\> flash in with your partial.

Thanks.

```
    Hugh
```
