searchlogic
searchlogic copied to clipboard
date_select not working
I found some old issues, concerning the date_select helper. It looks like there should be support to use this helper in combination with searchlogic.
But when I use <%= f.date_select :start_after, :include_blank => true %> it fails with "The is not a valid condition. You may only use conditions that map to a named scope"
I have also encountered this issue. It looks like the dynamic finder is looking to match the individual date parts rather than the whole date...
undefined method `created_at_after(1i)='
same probleme here :
The is not a valid condition. You may only use conditions that map to a named scope
I have encountered this issue as well. This is really a fundemental requirement in an application I am currently writing. I am a big fan of Searchlogic because it helps keep my code very clean and I'd hate to need to use something else in order to solve this problem.
I have write a quick/dirty solution to handle date_select : make a file /config/initializer/searchlogic.rb
http://gist.github.com/259508
Here's another version that also handles datetime_select:
http://gist.github.com/312833
Very good patch, you can fork the source and ask for a merge? I temporary just unpack the gem and patch it myself there.
I forked and made the change in the gist. Seems to work well, but my pull request has gone unanswered http://github.com/philrosenstein/searchlogic
I also have a fork with this change : http://github.com/rubysolo/searchlogic
Same problem. I will utilize yours patchs. Tnks.