Please sign in to comment.
Scaffolded controller specs are compatible with Rails 4
* Rails 4 introduces [strong_parameters](https://github.com/rails/strong_parameters). * If a model is scaffolded with attributes (e.g., `rails generate scaffold foo bar:string`), Rails will generate a controller that only accepts `bar`. This means that the controller spec must be aware of the specific parameters when sending PUT (update) requests. * Furthermore if a model is scaffolded with attributes, Rails generates a controller that *requires* the #presence of attributes. This means we cannot send in an empty Hash, as the Rails framework will return a 400 Bad Request.
- Loading branch information...
Showing with 54 additions and 10 deletions.