Skip to content
Browse files

note on increasing performance a bit when using restful urls

  • Loading branch information...
1 parent 6a5ac86 commit 235cd218b692d5a648a03cf574f5a049202845ea @TomK32 TomK32 committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 actionpack/lib/action_controller/resources.rb
View
4 actionpack/lib/action_controller/resources.rb
@@ -296,6 +296,10 @@ def initialize(entity, options)
# article_comments_url(:article_id => @article)
# article_comment_url(:article_id => @article, :id => @comment)
#
+ # If you don't want to load all objects from the database you might want to use the <tt>article_id</tt> directly:
+ #
+ # articles_comments_url(@comment.article_id, @comment)
+ #
# * <tt>:name_prefix</tt> - Define a prefix for all generated routes, usually ending in an underscore.
# Use this if you have named routes that may clash.
#

0 comments on commit 235cd21

Please sign in to comment.
Something went wrong with that request. Please try again.