Note about ORM compatibility for association helper in source code and README.

This commit is contained in:
slainer68 2013-07-03 17:11:36 +02:00
parent dcf4862972
commit 442a2c57b7
2 changed files with 4 additions and 0 deletions

View File

@ -372,6 +372,8 @@ In case you want to declare different labels and values:
f.association :company, label_method: :company_name, value_method: :id, include_blank: false
```
Please note that the association helper is currently only tested with Active Record. It currently does not work well with Mongoid and depending on the ORM you're using your mileage may vary.
### Buttons
All web forms need buttons, right? **SimpleForm** wraps them in the DSL, acting like a proxy:

View File

@ -169,6 +169,8 @@ module SimpleForm
#
# From the options above, only :collection can also be supplied.
#
# Please note that the association helper is currently only tested with Active Record. Depending on the ORM you are using your mileage may vary.
#
def association(association, options={}, &block)
options = options.dup