Skip to content

SimpleForm unnecessary access the database for associations #228

Description

@jacob-carlborg

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions