On May 23, 3:33 pm, Ryan Bigg <[email protected]> wrote:
> As far as I know, this is what :as is for. I've never seen :class_name used
> within the context of routes, but it may be an available option I don't know
> about.

It would appear that it renames the helper route methods, but not the
URLs that are actually used (and exposed to the user):

  resources :forum_thread, :as => :thread

>From rake routes:
                  GET    /forum_thread(.:format)
{:action=>"index", :controller=>"forum_threads"}
     threads POST   /forum_thread(.:format)
{:action=>"create", :controller=>"forum_threads"}
new_thread GET     /forum_thread/new(.:format)
{:action=>"new", :controller=>"forum_threads"}
                 GET     /forum_thread/:id(.:format)
{:action=>"show", :controller=>"forum_threads"}
                 PUT     /forum_thread/:id(.:format)
{:action=>"update", :controller=>"forum_threads"}
     thread DELETE /forum_thread/:id(.:format)
{:action=>"destroy", :controller=>"forum_threads"}
 edit_thread GET    /forum_thread/:id/edit(.:format)
{:action=>"edit", :controller=>"forum_threads"}

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en.

Reply via email to