rails save static page url in database with other data, then fetch result and wrap result with that url

how to figure this out. i building a travel application in which i will save data about many places, which have attributes like its name, short description, price,etc. also i like to save a url pointing to its static page which will have more information about that place.

since i am want to show detailed information(historical,culture,transit info,etc) about the place, thats why chose to create a static page.

now, when a user does a search using certain parameters, i like to load the result wrapped with its static page url in the show page.

A search is likely to be an sql search unless you are embedding google search api functionality so you won't pick up static page content.

You could write a search bot that will trawl your static pages dumping the static content into a database that could be run as a background rake task on deployment. That way you can use whatever search gems/functionality you wish. Nokogiri gem or Mechanize gem which is built on top of nokogiri would massively simplify this task.

This would give you Postgres, Thinking Sphinx, Elastic Search or any of the other major search functionality available for the whole site threfore not needing to worry about embedding static pages in a search based on a url.

There are railscasts on all the above mentioned gems that might also help.

Hope that gives you something to think about and a possible starting point but there is not much more can be said without further clarity really.