diff options
author | Zachary Scott <e@zzak.io> | 2014-06-13 11:38:02 -0700 |
---|---|---|
committer | Zachary Scott <e@zzak.io> | 2014-06-13 11:38:02 -0700 |
commit | cc255d3424207ebb3952029df4a485c696b0dc6e (patch) | |
tree | 6c584f9bc2d2d531cd8680937e81f87a6244216a /guides | |
parent | 1a203d5e07f639332880099fab610b886b1742fc (diff) | |
download | rails-cc255d3424207ebb3952029df4a485c696b0dc6e.tar.gz rails-cc255d3424207ebb3952029df4a485c696b0dc6e.tar.bz2 rails-cc255d3424207ebb3952029df4a485c696b0dc6e.zip |
Copy edits from e0f3f1a [ci skip]
- image_tag is an instance method
- explain possible results when asset pipeline is used
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/api_documentation_guidelines.md | 10 |
1 files 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") # # => <img alt="Icon" src="/assets/icon.png" /> ``` -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. |