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?
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.