From cc255d3424207ebb3952029df4a485c696b0dc6e Mon Sep 17 00:00:00 2001 From: Zachary Scott Date: Fri, 13 Jun 2014 11:38:02 -0700 Subject: [PATCH] Copy edits from e0f3f1a [ci skip] - image_tag is an instance method - explain possible results when asset pipeline is used --- guides/source/api_documentation_guidelines.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/guides/source/api_documentation_guidelines.md b/guides/source/api_documentation_guidelines.md index 5b95d925a1..7e9b288ffd 100644 --- a/guides/source/api_documentation_guidelines.md +++ b/guides/source/api_documentation_guidelines.md @@ -341,15 +341,19 @@ method or class you're trying to document. In various places there is different behavior when you take the entire stack into account, one such example is -`ActionView::Helpers::AssetTagHelper.image_tag`: +`ActionView::Helpers::AssetTagHelper#image_tag`: ```ruby # image_tag("icon.png") # # => Icon ``` -Although the default behavior for `image_tag` is `/images/icon.png`, because -the Rails stack includes Sprockets when using the Rails Asset Pipeline. +Although the default behavior for `#image_tag` is to always return +`/images/icon.png`, we take into account the full Rails stack (including the +Asset Pipeline) we may see the result seen above. + +We're only concerned with the behavior experienced when using the full default +Rails stack. In this case, we want to document the behavior of the _framework_, and not just this specific method.