Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autocomplete should be more configurable #195

Open
eiked opened this issue Dec 8, 2012 · 1 comment
Open

autocomplete should be more configurable #195

eiked opened this issue Dec 8, 2012 · 1 comment

Comments

@eiked
Copy link

eiked commented Dec 8, 2012

The autocomplete helper is a very nice thing,
but I believe it still misses some options to make it even more usable
I believe this can be done at ease.

so currently
autocomplete :table, :field

This currently generates a default query but we might need to customize this.

I'd suggest something around:
autocomplete :table, :scope => :my_scope

(it should then invoke Table.scope to obtain values)

also customization of the limit would be nice,
like
autocomplete :table, :field, :limit => 20

last but not least, adding a block might be cute
like
autocomplete :table, :field {|(name.id)| [name.camelize, id]}

you get the idea

@eiked
Copy link
Author

eiked commented Dec 8, 2012

sorry for the typo,
that should have been

autocomplete :table, :field {|(name, id)| [name.camelize, id]}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant