diff options
| author | Arthur Nogueira Neves <github@arthurnn.com> | 2015-03-20 23:23:03 -0400 | 
|---|---|---|
| committer | Arthur Nogueira Neves <github@arthurnn.com> | 2015-03-20 23:23:03 -0400 | 
| commit | 92a3c8dcdf174dab5e8759031b6bbe6cd891fe3c (patch) | |
| tree | bd9128e2aaef66e19a2e920175c7da703c6173a6 /actionview/lib/action_view/helpers | |
| parent | 34640210ecd87e9b9b65c0e5840344a44c9d50c9 (diff) | |
| parent | cd83775858cde4bcbd934b5b8dc270b58ba0b9d1 (diff) | |
| download | rails-92a3c8dcdf174dab5e8759031b6bbe6cd891fe3c.tar.gz rails-92a3c8dcdf174dab5e8759031b6bbe6cd891fe3c.tar.bz2 rails-92a3c8dcdf174dab5e8759031b6bbe6cd891fe3c.zip | |
Merge pull request #19438 from yui-knk/fix/comment
[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.rb | 3 | 
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 | 
