I think its possible only thru routes.rb, cannot be done in controller,
As i see, if you have "link_name" in your database for each page on
site:
like:
http://site.com/homepage -> redirects to /site/1
http://site.com/about -> /site/3
in table of "menus" its looks
id --- link ----------- name --- ...
1 homepage Welcome to Homepage
3 about Everything about us
"link" field is used to be a "friendly" link and generated thru
routes.rb.
i think is simpliest way.
You cannot display dynamic results under the same route showing in the
address bar, except you use POST instead of GET
Maybe that would work ... someone would type :
http://yoursite.com/results/etab-mobile
and the route would be:
map.connect 'results/:module_name',
:controller => 'results',
:action => 'show'
then you have params[:module_name] available in your show action and
can pull the correct dataset from the DB
with find(:first, :conditions => [module_name =
?,params[:module_name]])
or sth. similar.