The recommended solution is this:
config.active_record.whitelist_attributes = true
But this only works if you are using active record. On a mongoid rails project is there a similar approach? It uses active model but not active record.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I have asked the same question
https://groups.google.com/forum/?fromgroups#!topic/mongoid/xuBbuyhiFEU
It is currently not supported but you can do a (straight forward) monkey patch (as Benedikt
suggested)
https://gist.github.com/1977438
It is very similar to AR (you could check in AR code, I copy it here for simplicity)