Skip to content

Commit 94de154

Browse files
Update documentation in asset_tag_helper.rb
Just a wee bit of visualization changes to make it more explicitly clear what is being passed (a quoted number) Co-authored-by: Jonathan Hefner <[email protected]>
1 parent 14294c0 commit 94de154

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

actionview/lib/action_view/helpers/asset_tag_helper.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,8 @@ def preload_link_tag(source, options = {})
378378
# You can add HTML attributes using the +options+. The +options+ supports
379379
# additional keys for convenience and conformance:
380380
#
381-
# * <tt>:size</tt> - Supplied as "{Width}x{Height}" or "{Number}", so "30x45" becomes
382-
# width="30" and height="45", and "50" becomes width="50" and height="50".
381+
# * <tt>:size</tt> - Supplied as <tt>"#{width}x#{height}"</tt> or <tt>"#{number}"</tt>, so <tt>"30x45"</tt> becomes
382+
# <tt>width="30" height="45"</tt>, and <tt>"50"</tt> becomes <tt>width="50" height="50"</tt>.
383383
# <tt>:size</tt> will be ignored if the value is not in the correct format.
384384
# * <tt>:srcset</tt> - If supplied as a hash or array of <tt>[source, descriptor]</tt>
385385
# pairs, each image path will be expanded before the list is formatted as a string.
@@ -511,8 +511,8 @@ def picture_tag(*sources, &block)
511511
#
512512
# * <tt>:poster</tt> - Set an image (like a screenshot) to be shown
513513
# before the video loads. The path is calculated like the +src+ of +image_tag+.
514-
# * <tt>:size</tt> - Supplied as "{Width}x{Height}" or "{Number}", so "30x45" becomes
515-
# width="30" and height="45", and "50" becomes width="50" and height="50".
514+
# * <tt>:size</tt> - Supplied as <tt>"#{width}x#{height}"</tt> or <tt>"#{number}"</tt>, so <tt>"30x45"</tt> becomes
515+
# <tt>width="30" height="45"</tt>, and <tt>"50"</tt> becomes <tt>width="50" height="50"</tt>.
516516
# <tt>:size</tt> will be ignored if the value is not in the correct format.
517517
# * <tt>:poster_skip_pipeline</tt> will bypass the asset pipeline when using
518518
# the <tt>:poster</tt> option instead using an asset in the public folder.

0 commit comments

Comments
 (0)