1. Computing
Michael Morin

Rails 4: Mass Assignment

By June 30, 2013

Follow me on:

One of the many changes to Rails 4 has been the changes in mass assignment.  Gone are they days you can throw form input at the model and let it sort it out, you must explicitly tell the controller which form fields you want to pass down to the model.  This both takes an interface feature out of the model and makes the interface more flexible.  But it's a new way of doing things, so don't slip back into attr_accessible.

No comments yet. Leave a Comment
Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

©2014 About.com. All rights reserved.