From cd58745a7d6619366adde02fcb0baac6981c421a Mon Sep 17 00:00:00 2001 From: Kuldeep Aggarwal Date: Wed, 18 Dec 2013 12:24:08 +0530 Subject: allow video_tag to accept `size` as `Number` for square shaped videos --- actionview/lib/action_view/helpers/asset_tag_helper.rb | 14 ++++++++++---- actionview/test/template/asset_tag_helper_test.rb | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'actionview') diff --git a/actionview/lib/action_view/helpers/asset_tag_helper.rb b/actionview/lib/action_view/helpers/asset_tag_helper.rb index 163d01c2eb..bc5007b11d 100644 --- a/actionview/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionview/lib/action_view/helpers/asset_tag_helper.rb @@ -251,9 +251,9 @@ module ActionView # # * :poster - Set an image (like a screenshot) to be shown # before the video loads. The path is calculated like the +src+ of +image_tag+. - # * :size - Supplied as "{Width}x{Height}", so "30x45" becomes - # width="30" and height="45". :size will be ignored if the - # value is not in the correct format. + # * :size - Supplied as "{Width}x{Height}" or "{Number}", so "30x45" becomes + # width="30" and height="45", and "50" becomes width="50" and height="50". + # :size will be ignored if the value is not in the correct format. # # ==== Examples # @@ -267,6 +267,8 @@ module ActionView # # =>