Hi
I have an idea and I am not sure if is is already done.Right now to make url
search engine friendly developers use to_param function of model class. Then
they call to_s function to get the id of the elmenet. What if I want to
create url for not model but for string. Lets say I create link for post
controller''s search action. The only variable in the url is
search_string.
Si how can i create seo link for this search page. I know how to create
links etc etc. but my problem is I want to call function on this string such
as to_param or something like that to make seo string, also in the
controller to perform a search I have to humanize this string again. So what
I want is this:
In every view, I dont want to use urlizing method to make it se friendly
In every controller, I do not want to call any function to humanize string
back again, this should done by router
In the router:
match ''search/:string'' =>
''Post#search'', :as => :search, before =>
some_helper_function, after => some_other_helper_function
In these helper function what I will do is that i will parametrize any
params I want, then I will humanize any params back again
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.