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

search not working ? #5

Closed
koenhandekyn opened this issue Sep 23, 2018 · 2 comments
Closed

search not working ? #5

koenhandekyn opened this issue Sep 23, 2018 · 2 comments

Comments

@koenhandekyn
Copy link

koenhandekyn commented Sep 23, 2018

this is not working (nothing filtered)

  collection do
    Customer.order(name: :asc)
  end

  search do |q|
    # puts "test" # when adding debugging statements this doesn't seem to be called
    collection.where("name LIKE ?", "%#{q}%")
  end

while this is actually doing the filter (if manually adding the q param)

  collection do
    Customer.order(name: :asc).where("name LIKE ?", "%#{params[:q]}%")
  end

the infrastructure recognises the presence of the search block as a search input is shown. but i've added some debugging statement in the search block and it doesn't seem to be called ?

@spohlenz
Copy link
Member

I should have released a new version of trestle-search after releasing Trestle 0.8.11.

This has now been rectified with the 0.3.0 release of `trestle-search.

@koenhandekyn
Copy link
Author

it's working !

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

2 participants