crowdint / rails3-jquery-autocomplete

An easy and unobtrusive way to use jQuery's autocomplete with Rails 3

Home Page:http://rubygems.org/gems/rails3-jquery-autocomplete

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SimpleForm unnecessary access the database for associations

jacob-carlborg opened this issue · comments

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?