Closed jabberfest closed 11 years ago
Pull Request isn't ready to be merged. I need to update the tests.... Not sure how you have it setup but when I run rake test I get tests failing with "NoMethodError: undefined method `sanitize_for_mass_assignment' for #Post:0x0000000205c7b8"
Can you help look into it? Looks like ActiveModel::MassAssignmentSecurity doesn't get loaded in the test environment.
if defined?(::Rails)
extend ActiveModel::Callbacks
extend ActiveModel::Naming
include ActiveModel::Conversion
include ActiveModel::Validations
include ActiveModel::MassAssignmentSecurity
My changes work fine if I test manually from a rails app using the same models used in the unit tests.
Looks good to me, I will merge it when some smoke tests will be available
Probably this patch will help http://review.couchbase.org/26137
Thanks I will try that. I have it working now. Need to finish tests before I add commits to this pull request. Will have it in a day or so.
Should be good to go :-) Let me know if you disagree with anything.
Moved to review system http://review.couchbase.org/26236
Fixed in 99fa4825fc74dfc2cf522b75d797b02512001d58, @ingenthr could you close the ticket?
I'm confused. The commit you referenced refers to "Support for batch finding multiple objects by id".
@farias-r7 , your pull request on code review - http://review.couchbase.org/#/c/26236/2
Not sure if this review is a low priority. I know you guys are busy. I'm just using my own branch hoping this gets merged in, but I'm gonna be in a crappy state if it doesn't.
I don't want to maintain my own fork for a simple fix :-)
Rails 4 doesn't has mass assignment security out of the box. Developers moved it to the gem. Also today there is a trend to use strong parameters gem. So I think you have to choices - move your changes to the separated gem or use strong parameters aapproach. @avsej what do you think?
Closing ticket. @ka8725 you are right. I just looked into Rails 4 and it makes sense to go the strong parameters route. Thanks for the info!
Please close the associated ticket in your internal ticket system.
[Fixes #10] - Added ActiveModel::MassAssignmentSecurity support.