I have routes defined like
scope ':cityname' do
resources comments
end
Note cityname = comment.user.cityname
so url helpers such as comment_path(@comment)
can generate links like
/newyork/comments/1
/boston/comments/2
/miami/comments/3
How to set this :cityname
url option based on the model attribute?
I found a related question here : default_url_options and rails 3
Thanks!