Displaying 1 result from an estimated 1 matches for "kerplow".
Did you mean:
kerplop
2012 Jul 09
10
attr_accessible on some properties + attr_protected on others makes class 'open-by-default'
...ccessed in mass-assignment that is not
explicitly mentioned in eitherattr_accessible or attr_protected raises a
new error - something like
MassAssignmentError:AttributeNotExplicitlyDeclared. Maybe even throw an
error if the attribute is accessed in*any* way (mything.whatever="boo"; #
kerplow! throws error?) though that might perform poorly.
Solution #1 is probably fine - accesses to not attr_accessible properties
will throw a MassAssignment error under these circumstances anyways.
Solution #2 just makes things really explicit, which some might want for
some kinds of high-security a...