Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #45 Make scopes option can accepts Proc
Scopes can also override the select and where. So you can use code like following to query unique result. autocomplete :item, :brand, full: true, scopes: [-> { unscope(:select).select('MIN(id) as id, brand').group(:brand) }]
- Loading branch information