Jim Lindley Notes

url_for inferred (#6731)

May 13th, 2007

Rails will now infer the proper links for model objects with polymorphic routes:

With ‘map.resources :posts’ declared in your routes.rb file, you can do things like:

redirect_to(@post)
# or
form_for(@post)

Instead of previously:

redirect_to(post_path(@post)
# or
form_for @post, :post, :url...

Changset #6731

Sorry, comments are closed for this article.