EndPointCorp / end-point-blog

End Point Dev blog
https://www.endpointdev.com/blog/
17 stars 65 forks source link

Comments for Site Search on Rails #184

Open phinjensen opened 6 years ago

phinjensen commented 6 years ago

Comments for https://www.endpointdev.com/blog/2009/08/site-search-on-rails/ By Steph Skardal

To enter a comment:

  1. Log in to GitHub
  2. Leave a comment on this issue.
phinjensen commented 6 years ago
original author: D-LK
date: 2009-12-12T06:03:26-05:00

Hi,

My name is Christian. I am doing a similar school project in ruby. I have an advance and a simple search those search are done with xsl and I am using Nokogiri. My question is: Do you have an idea how to refine a search with xslt and how you append a variable to a url? is something like:

if :params[brand] link_to search, {:action => 'search', :search_id =>'5', :art => 'ball', brand => 'wilson' "} end

Regards.

phinjensen commented 6 years ago
original author: Steph Powell
date: 2009-12-14T12:35:02-05:00

Hi D-LK,

I'm not sure I understand your question. In this article, I've just provided pseudocode. To build the actual variables to the URLs, I used something like this:

b_url = '/s/' + ps[:id] if ps[:id] b_url += '/brand/' + ps[:rbrand] if ps[:rbrand] b_url += '/merch/' + ps[:rmerch] if ps[:rmerch] ...

Perhaps there's a rails way to build a URL and order parameters this way.

I haven't worked with xslt so I'm not sure I could be of much help there. If this doesn't answer your question, please clarify.

Thanks!