aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/helpers
diff options
context:
space:
mode:
authoryui-knk <spiketeika@gmail.com>2015-03-21 09:30:48 +0900
committeryui-knk <spiketeika@gmail.com>2015-03-21 09:30:48 +0900
commitcd83775858cde4bcbd934b5b8dc270b58ba0b9d1 (patch)
treebd9128e2aaef66e19a2e920175c7da703c6173a6 /actionview/lib/action_view/helpers
parent34640210ecd87e9b9b65c0e5840344a44c9d50c9 (diff)
downloadrails-cd83775858cde4bcbd934b5b8dc270b58ba0b9d1.tar.gz
rails-cd83775858cde4bcbd934b5b8dc270b58ba0b9d1.tar.bz2
rails-cd83775858cde4bcbd934b5b8dc270b58ba0b9d1.zip
[ci skip] Check a result of `valid?` instead of `create`
Diffstat (limited to 'actionview/lib/action_view/helpers')
-rw-r--r--actionview/lib/action_view/helpers/form_helper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/form_helper.rb b/actionview/lib/action_view/helpers/form_helper.rb
index b0793d0b91..63bb4ce32f 100644
--- a/actionview/lib/action_view/helpers/form_helper.rb
+++ b/actionview/lib/action_view/helpers/form_helper.rb
@@ -69,7 +69,8 @@ module ActionView
# controller gets a nested hash <tt>params[:person]</tt> with the person attributes
# set in the form. That hash is ready to be passed to <tt>Person.create</tt>:
#
- # if @person = Person.create(params[:person])
+ # @person = Person.create(params[:person])
+ # if @person.valid?
# # success
# else
# # error handling