This project is archived and is in readonly mode.
sending :alt => nil to an image tag should omit the images alt tag
-
Jeff Dean
Here's a patch that fixes it, with a test.
-
Jeff Dean
- Tag changed from action_view to action_view, patch
-
Mislav
+1 for teaching me about
Hash#fetch -
Dan Pickett
- Tag changed from action_view, patch to action_view, bugmash, patch
-
Anthony Burns
+1 for teaching me Hash#fetch as well
-
Marc-André Lafortune
Hi Jeff!
I'd recommend using the block form of fetch, to avoid an unnecessary calculation in case the :alt option is specified. Modified diff attached.
-
Marc-André Lafortune
Let's try the attachment again...
-
Jeff Dean
- Tag cleared.
And thanks for Marc-Andre for introducing me to fetch last year! I forgot about the block syntax.
-
Josh Kalderimis
+1
Handy addition
-
José Valim
- Milestone cleared.
- Assigned user set to José Valim
-
Tony Pitale
+1 would be nice, definitely had this minor annoyance.
-
Repository
- State changed from new to resolved
(from [9869ee77cdbf8f0e9c7eb6e33738d0aa8f5dc70a]) Accept :alt => nil on image_tag [#4558 state:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/9869ee77cdbf8f0e9c7eb6e33738d0...
