Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def autocomplete_city_name
- common_user_autocomplete :name do
- City.where("LOWER(UNACCENT(name)) like ?", term + '%')
- end
- end
- def autocomplete_category_name
- common_user_autocomplete :name, [:level] do
- CslCategory.where("LOWER(UNACCENT(name)) like ?", term + '%').order(left_bound: :desc)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement