Mongoid only seems to have an app wide Mongoid.allow_dynamic_fields
setting. But I want every collection to decide whether it wants dynamic fields or not. How can I do that?
Asked
Active
Viewed 318 times
2

Coffee Bite
- 4,956
- 5
- 33
- 38
-
Did you already find a solution for your problem? Because I have the same at the moment :). – Matthias Aug 13 '12 at 12:59
-
Nah buddy .. I did not. I basically allowed it for all and controlled the params in the controller myself. – Coffee Bite Aug 14 '12 at 03:15
-
Apparently coming in Mongoid 4.0: https://github.com/mongoid/mongoid/issues/2048 – Wolfram Arnold Dec 19 '12 at 23:14
1 Answers
0
This is not possible in mongoid 3.x yet even though there is a pull request already for it, https://github.com/mongoid/mongoid/pull/2563. This will be released on mongoid 4.0. However if you really need that feature you could checkout those 2 commits in a local folder or in a fork , an use it.

Arthur Neves
- 11,840
- 8
- 60
- 73