MongoMapper default values and simple_form
-
13-11-2019 - |
Question
I have a Character model which has some defaults and have created a simple form for it (or rather a subclass of the Character model) all tied together by a controller.
The problem is that the form does not get the default values when called by simple_form_for Character.new
.
Have I missed some configuration flag I need to set or do I have to edit the simple_form templates?
Solution
there is an open pull request for this issue: https://github.com/jnunemaker/mongomapper/pull/393
so you should wait a bit before it will be merged :)
BTW, it's not a SimpleForm
issue but rails form_for
.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow