rails 3 route alias
In older version 2.x I was doing something like:
map.resources :jobs, :as => 'vagas'
and this way, I can use jobs_path to create a link to.
But in rails 3, I still can use :as to define an alias, but I cannot use jobs_path anymore, because it forces me to use vagas_path.
So I was wondering if have any way to define an alias and still use the original 开发者_StackOverflow中文版resource name to create a link.
resources :jobs, :path => 'vagas' # after the original!
'map' is in Rails 2.x
You should:
resources :jobs, :path => :vagas
精彩评论