From 442a2c57b7cf3bffcc09ddb5846f27aa7254d3f1 Mon Sep 17 00:00:00 2001 From: slainer68 Date: Wed, 3 Jul 2013 17:11:36 +0200 Subject: [PATCH] Note about ORM compatibility for association helper in source code and README. --- README.md | 2 ++ lib/simple_form/form_builder.rb | 2 ++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 468dd97f..146bcf84 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/lib/simple_form/form_builder.rb b/lib/simple_form/form_builder.rb index 408e3c08..c5ff4956 100644 --- a/lib/simple_form/form_builder.rb +++ b/lib/simple_form/form_builder.rb @@ -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