[Rails] searchlogic+date_select+ordering
hi there,
i try to use searchlogic to find entities by date.
its working if i just try to search something.
the ordering helper is also working if i just show all results.
if i want to order (lets say by zipcode) and find by date it wont work.
the order helper messes up the params[:search] in case of using a date
if i just search something the params look like (good):
Parameters: {"commit"=>"Finden", "search"=>{"date_like(1i)"=>"2010",
"date_like(2i)"=>"6", "zipcode_like"=>"", "date_like(3i)"=>"24"}}
if i try to order the results by clicking the order helper link the
params look like (bad):
Parameters: {"search"=>{"order"=>"ascend_by_zipcode",
"date_like"=>"2010-06-24 00:00:00 UTC", "zipcode_like"=>""}}
if i manually set the params its working as well.
http://localhost:3000/dinners?search[order]=descend_by_zipcode&search[date_like%283i%29]=24&search[date_like%282i%29]=6&search[date_like%281i%29]=2010&search[zipcode_like]=&commit=Finden
so, just the helper does something wrong with the date params. i have
absolutely now clue, iam also very new to ruby/rails.
does anybody know how to get this working?
thanks for any help
chris
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home