1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix nodoc comment

This commit is contained in:
Rafael Mendonça França 2012-10-07 00:14:35 -03:00
parent e1dd284614
commit c22a550f2e

View file

@ -2,11 +2,11 @@ module ActionView
# = Action View Cache Helper # = Action View Cache Helper
module Helpers module Helpers
module CacheHelper module CacheHelper
# This helper exposes a method for caching fragments of a view # This helper exposes a method for caching fragments of a view
# rather than an entire action or page. This technique is useful # rather than an entire action or page. This technique is useful
# caching pieces like menus, lists of newstopics, static HTML # caching pieces like menus, lists of newstopics, static HTML
# fragments, and so on. This method takes a block that contains # fragments, and so on. This method takes a block that contains
# the content you wish to cache. # the content you wish to cache.
# #
# The best way to use this is by doing key-based cache expiration # The best way to use this is by doing key-based cache expiration
# on top of a cache store like Memcached that'll automatically # on top of a cache store like Memcached that'll automatically
@ -56,40 +56,40 @@ module ActionView
# #
# Most template dependencies can be derived from calls to render in the template itself. # Most template dependencies can be derived from calls to render in the template itself.
# Here are some examples of render calls that Cache Digests knows how to decode: # Here are some examples of render calls that Cache Digests knows how to decode:
# #
# render partial: "comments/comment", collection: commentable.comments # render partial: "comments/comment", collection: commentable.comments
# render "comments/comments" # render "comments/comments"
# render 'comments/comments' # render 'comments/comments'
# render('comments/comments') # render('comments/comments')
# #
# render "header" => render("comments/header") # render "header" => render("comments/header")
# #
# render(@topic) => render("topics/topic") # render(@topic) => render("topics/topic")
# render(topics) => render("topics/topic") # render(topics) => render("topics/topic")
# render(message.topics) => render("topics/topic") # render(message.topics) => render("topics/topic")
# #
# It's not possible to derive all render calls like that, though. Here are a few examples of things that can't be derived: # It's not possible to derive all render calls like that, though. Here are a few examples of things that can't be derived:
# #
# render group_of_attachments # render group_of_attachments
# render @project.documents.where(published: true).order('created_at') # render @project.documents.where(published: true).order('created_at')
# #
# You will have to rewrite those to the explicit form: # You will have to rewrite those to the explicit form:
# #
# render partial: 'attachments/attachment', collection: group_of_attachments # render partial: 'attachments/attachment', collection: group_of_attachments
# render partial: 'documents/document', collection: @project.documents.where(published: true).order('created_at') # render partial: 'documents/document', collection: @project.documents.where(published: true).order('created_at')
# #
# === Explicit dependencies # === Explicit dependencies
# #
# Some times you'll have template dependencies that can't be derived at all. This is typically # Some times you'll have template dependencies that can't be derived at all. This is typically
# the case when you have template rendering that happens in helpers. Here's an example: # the case when you have template rendering that happens in helpers. Here's an example:
# #
# <%= render_sortable_todolists @project.todolists %> # <%= render_sortable_todolists @project.todolists %>
# #
# You'll need to use a special comment format to call those out: # You'll need to use a special comment format to call those out:
# #
# <%# Template Dependency: todolists/todolist %> # <%# Template Dependency: todolists/todolist %>
# <%= render_sortable_todolists @project.todolists %> # <%= render_sortable_todolists @project.todolists %>
# #
# The pattern used to match these is /# Template Dependency: ([^ ]+)/, so it's important that you type it out just so. # The pattern used to match these is /# Template Dependency: ([^ ]+)/, so it's important that you type it out just so.
# You can only declare one template dependency per line. # You can only declare one template dependency per line.
# #
@ -113,8 +113,7 @@ module ActionView
nil nil
end end
#:nodoc: def fragment_name_with_digest(name) #:nodoc:
def fragment_name_with_digest(name)
if @virtual_path if @virtual_path
[ [
*Array(name.is_a?(Hash) ? controller.url_for(name).split("://").last : name), *Array(name.is_a?(Hash) ? controller.url_for(name).split("://").last : name),