Shouldn't rails by default protect belongs_to associations. There is probably a minute number of cases where someone wants mass assignment changes to include the parent's id of that record.
back
1 comments
In my uses of rails, belongs_to associations get changed frequently. Any time anything gets 'assigned' to something, this occurs: assigning something to a user, to a milestone, to a plan, to an account, maybe even to a priority. YMMV but I'd say this isn't minute.
That said, there are certainly places in my apps where I don't want this to occur. And whitelisting is much better than blacklisting!
And you're using mass assignment to do those assignments?
Nah, just changing the _id column's value so that the belongs_to association changes.
"There is probably a minute number of cases where someone wants mass assignment changes to include the parent's id of that record"
So it sounds like you aren't using mass assignment to change parent ids either. Most people don't. Most people use mass assignment to change the attributes of an object, not that objects association to a parent.