diff options
author | Genadi Samokovarov <gsamokovarov@gmail.com> | 2015-12-13 19:37:22 +0100 |
---|---|---|
committer | Genadi Samokovarov <gsamokovarov@gmail.com> | 2015-12-13 20:18:19 +0100 |
commit | c83ace7b6a5720be30a2f7d843d545fc81af54cd (patch) | |
tree | 2084a99088604dc00be5ea89be544caf94099273 /railties/test/generators/integration_test_generator_test.rb | |
parent | eb0e8e216fcf535a1e6b82720dfb7639fcc20ff2 (diff) | |
download | rails-c83ace7b6a5720be30a2f7d843d545fc81af54cd.tar.gz rails-c83ace7b6a5720be30a2f7d843d545fc81af54cd.tar.bz2 rails-c83ace7b6a5720be30a2f7d843d545fc81af54cd.zip |
Prevent a 500 in the default controller scaffold
If you update a record with no attributes, you'll hit a 500 from a guard
in `assign_attributes` raising:
```ruby
ArgumentError: When assigning attributes, you must pass a hash as an argument.
app/controllers/users_controller.rb:44:in `block in update'
app/controllers/users_controller.rb:43:in `update'
test/controllers/users_controller_test.rb:37:in `block in <class:UsersControllerTest>'
```
Not a biggie, but may be quite confusing for the folks new to the
framework.
Diffstat (limited to 'railties/test/generators/integration_test_generator_test.rb')
0 files changed, 0 insertions, 0 deletions