I have the following view that used to render without any warnings:
#listing
-if flash[:notice]
.success
=flash[:notice]
.input-container
-form_for @user do |f|
=f.error_mes开发者_JS百科sages
=render :partial => 'form', :locals => {:f => f}
But now when I render the view by running a functional test, I get the following warning:
DEPRECATION WARNING: - style block helpers are deprecated. Please use =.
Does anyone know what this warning means?
Yeah, instead of:
-form_for @user do |f|
use
=form_for @user do |f|
In other words, do exactly what it suggests. Flip the dash into an equals. This is new in Rails 3.
http://edgeguides.rubyonrails.org/3_0_release_notes.html#action-view (Section 7.4.2)
精彩评论