SimpleForm unnecessary access the database for associations
jacob-carlborg opened this issue · comments
Jacob Carlborg commented
I've noticed that simple_form eagerly fetches records for an association. Example:
<%= f.association :foo, as: :autocomplete_collection, url: foo_path %>
That's completely unncessary since the collection is never used for the :autocomplete_collection
type. The whole point I'm using this type is because the data in that table is very large. Is there a way we can add an empty collection option, collection: []
, somewhere?