Fix sanitize_for_mass_assigment when role is nil #5049

Merged
merged 1 commit into from Feb 15, 2012

2 participants

@fabioyamate

There is an example in Rails documentation that suggests implementing
assign_attributes method for ActiveModel interface, that by default
sends option role with nil. Since mass_assignment_authorizer never
is called without args, we can move the default value internally.

This should be backported to Rails 3.2

@fabioyamate fabioyamate Fix sanitize_for_mass_assigment when role is nil
There is an example in Rails documentation that suggests implementing
assign_attributes method for ActiveModel interface, that by default
sends option role with nil. Since mass_assignment_authorizer never
is called without args, we can move the default value internally.
d204918
@josevalim josevalim merged commit 1c22c6f into rails:master Feb 15, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment