I would like to use the :as parameter on a namespaced route, like so:
routes.rb
map.namespace :banana, :as => 'apple', do |banana|
...
end
But it seems that the :as parameter is only available to map.resources. Am I missing something, should I refactor my routes?
I’m stuck on Rails 2.3.8 for this situation.
:as is for map.resource only, since it is used as a way to override the route, instead of using the Model’s class name. Here are the 2.3 Rails docs
Why bother with
:as => 'apple'and just use apple as the namespace?