# What shoud flash\[:alert\] be in edge rails?

**URL:** <https://www.ruby-forum.com/t/what-shoud-flash-alert-be-in-edge-rails/103193>\
**Category:** Rails\
**Created:** [May 2, 2007, 8:53pm UTC](https://www.ruby-forum.com/t/what-shoud-flash-alert-be-in-edge-rails/103193 "2007-05-02T20:53:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![josh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/45deac/32.png) [@josh](https://www.ruby-forum.com/u/josh)\
**Post date:** [May 2, 2007, 8:53pm UTC](https://www.ruby-forum.com/t/what-shoud-flash-alert-be-in-edge-rails/103193/1 "2007-05-02T20:53:03Z")

</div>

Hi

I haveJust attmpting to start using edge rails for the first time.

Couldnt find the answer to this anywhere, below is a small peiece of  
code I have been using, but flash[:notice] does not seem to work anymore

What should i be using instead?

%if flash[:notice] || flash[:alert] -%\>

\<%= flash[:notice] || flash[:alert] %\>

  
\<% end -%\>

cheers

---

<div class="post-metadata">

**Author:** ![josh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/45deac/32.png) [@josh](https://www.ruby-forum.com/u/josh)\
**Post date:** [May 2, 2007, 9:35pm UTC](https://www.ruby-forum.com/t/what-shoud-flash-alert-be-in-edge-rails/103193/2 "2007-05-02T21:35:10Z")

</div>

flash is just a hash. Rails doesn’t do anything specific if there’s a  
key  
named :notice. There’s something else wrong with your code. Can we see  
the  
related controller?

Jason

---

<div class="post-metadata">

**Author:** ![josh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/45deac/32.png) [@josh](https://www.ruby-forum.com/u/josh)\
**Post date:** [May 2, 2007, 9:52pm UTC](https://www.ruby-forum.com/t/what-shoud-flash-alert-be-in-edge-rails/103193/3 "2007-05-02T21:52:54Z")

</div>

Jason R. wrote:

> flash is just a hash. Rails doesn’t do anything specific if there’s a  
> key  
> named :notice. There’s something else wrong with your code. Can we see  
> the  
> related controller?
> 
> Jason

This is the code from one of the broken controllers

# 

```
# POST /blogs
# POST /blogs.xml
def create
    @blog = Blog.new(params[:blog])

    respond_to do |format|
        if @blog.save

            flash[:notice] = 'Blog post was successfully created.'

            format.html { redirect_to blog_url(@blog) }
            format.xml { head :created, :location => 

```

blog\_url(@blog) }  
else  
format.html { render :action =\> “new” }  
format.xml { render :xml =\> @blog.errors.to\_xml }  
end  
end  
end
