You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into this bug with Rails 3. I have a model where I used attr_accessible without a list of attributes to make all attributes protected. But because my white list is empty, AllowMassAssignmentOfMatcher fails to realize the model is using whitelisting so RSpec ends up throwing exceptions. The #whitelisting? check should not rely on there being an attribute white-listed.
Workaround: Make up a fake attribute. Ugly, but works. attr_accessible :shoulda_fails_unless_there_is_at_least_one_item
The text was updated successfully, but these errors were encountered:
I ran into this bug with Rails 3. I have a model where I used
attr_accessible
without a list of attributes to make all attributes protected. But because my white list is empty,AllowMassAssignmentOfMatcher
fails to realize the model is using whitelisting so RSpec ends up throwing exceptions. The #whitelisting? check should not rely on there being an attribute white-listed.Workaround: Make up a fake attribute. Ugly, but works.
attr_accessible :shoulda_fails_unless_there_is_at_least_one_item
The text was updated successfully, but these errors were encountered: