aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template/asset_tag_helper_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Move template tests from actionpack to actionviewPiotr Sarnacki2013-06-201-762/+0
|
* Use a case insensitive URI Regexp for #asset_pathDavid Celis2013-06-161-2/+5
| | | | | | | | | | | | | Context: https://gist.github.com/radar/5793814 The `URI_REGEXP` that various AssetUrl helpers use is currently case sensitive when checking for a URI scheme. This means if you try to pass a URL like `HTTP://www.example.com/path/to/image.jpg`, you end up with a bogus asset path: `/assets/HTTP://www.example.com/path/to/image.jpg`. URLs are case insensitive, so this regexp should be as well. Signed-off-by: David Celis <me@davidcel.is>
* Raise ArgumentError to fix Rails 4.1 deprecation warn message.kennyj2013-06-021-5/+7
|
* restore ability to return nil from asset_host proc, add testSean Walbran2013-05-151-0/+11
|
* Revert "Revert "Merge pull request #4803 from lucascaton/master""Santiago Pastorino2013-02-211-1/+1
| | | | This reverts commit 6871bd9818a9a7d9d8c7e21e253d64c0410fde1d.
* Revert "Merge pull request #4803 from lucascaton/master"Santiago Pastorino2013-02-201-1/+1
| | | | | | | | | | | | | | | This reverts commit bb842e8d2111e50b21a14b8bd6d89371a4b9cd68, reversing changes made to 40c287c7983c20c498f6a8a2ea49e9a6455347f7. This was causing issues in one of our apps we just upgraded. ActionController::RoutingError: No route matches [GET] "/images/favicon.ico" favicon_link_tag now returns '/images/favicon.ico' and in 3.2 returned '/favicon.ico' Browsers by default look for favicon.ico in the root directory Conflicts: actionpack/CHANGELOG.md actionpack/lib/action_view/helpers/asset_tag_helper.rb
* Improve img alt attribute for screen readersthenickcox2013-02-091-1/+2
| | | | | | | | | | | | Currently, the img_alt method in ActionView keeps underscores in the alt attribute. Because underscores are pronounced in Apple's VoiceOver Utility, this has serious implications for accessibility. This patch makes underscored or hyphenated file names (both common in projects) read more naturally in screen readers by replacing them with spaces. See method documentation for details. Added documentation to image_alt method
* handle protocol option in stylesheet_link_tag and javascript_include_tagVasiliy Ermolovich2012-12-181-1/+23
| | | | closes #8388
* Ignore asset url query string or anchor when appending extensions and ↵Joshua Peek2012-10-151-1/+18
| | | | computing public path
* Extract compute_asset_extname and allow extname to be disabledJoshua Peek2012-10-151-6/+15
|
* :fire: Rails asset id supportJoshua Peek2012-10-151-80/+1
|
* Allow asset url config to be undefinedJoshua Peek2012-10-131-0/+41
|
* Add a few more compute_asset_path testsJoshua Peek2012-10-131-0/+8
|
* JAVASCRIPTS_DIR, STYLESHEETS_DIR, ASSETS_DIR don't even exist anymoreJoshua Peek2012-10-121-28/+0
|
* Ensure AssetUrlHelper can be mixed into AC::BaseJoshua Peek2012-10-121-0/+33
|
* Refactor AssetUrlHelper to make it friendly for plugins and extensionsJoshua Peek2012-10-121-1/+35
| | | | | | | | Add asset_path/url helper for a consolidated entry point Expose compute_asset_path as a public API Expose compute_asset_host as a public API Move RAILS_ASSET_ID to its own module, AssetIdHelper Removed AV::AssetPaths
* Add asset_path and asset_url helpersJoshua Peek2012-10-121-0/+18
|
* Remove old asset tag concatenationJoshua Peek2012-10-101-752/+0
| | | | Use sprockets, jammit, or some other asset bundler
* allow to pass numerical value to size option in image_tagNihad Abbasov2012-09-251-1/+1
| | | | | This will set image's both width and height attributes to value passed in size option.
* Deprecate mime types lookup in auto_discovery_link_tagPiotr Sarnacki2012-08-281-1/+10
| | | | | | Automatically handling mime types for things other than :rss and :atom is not functionality that justifies dependency on Mime::Type from actionpack.
* Do not include application.js if it doesn't existsPrem Sichanugrist2012-08-061-0/+9
| | | | | | Rails were including 'application.js' to the pack when using `javascript_include_tag :all` even there's no application.js in the public directory.
* Respect absolute paths in compute_source_path.Steve Klabnik2012-06-161-3/+11
| | | | | | | | | | | | | | | | When using compute_source_path to determine the full path of an asset, if our source begins with '/', we don't want to include the directory. Examples are illustrative: > compute_source_path("foo", "stylesheets", "css") => "/Users/steve/src/my_app/public/stylesheets/foo.css" > compute_source_path("/foo", "stylesheets", "css") => "/Users/steve/src/my_app/public/foo.css" Before this patch, the second example would return the same as the first. Fixes #5680.
* Render img tag with empty src if empty string is passed to image_tag.Kirill Lashuk2012-05-181-0/+1
|
* Remove `:mouseover` option from `image_tag` helper.Rafael Mendonça França2012-05-131-8/+0
|
* Merge pull request #3237 from sakuro/data-url-schemeRafael Mendonça França2012-05-131-1/+2
| | | | | | | Support data: url scheme Conflicts: actionpack/lib/action_view/asset_paths.rb
* Remove unnecessary in HTML 5 type attribute with default valueAndrey A.I. Sitnik2012-04-051-93/+93
|
* Compute asset paths from the request if ENV["RAILS_RELATIVE_URL_ROOT"] is ↵Dwayne Litzenberger2012-03-051-0/+102
| | | | | | | | | not set. This should fix the following issue: "Rails is not a Rack Application (SCRIPT_NAME vs. relative_url_root ?)" https://github.com/rails/rails/issues/910
* Always use content_tag for audio/video tagRafael Mendonça França2012-02-071-15/+15
| | | | Closes #4919
* Add *_url helpers to get the full assets URLPrem Sichanugrist2012-02-041-2/+129
| | | | | | | Adds `image_url`, `javascript_url`, `stylesheet_url`, `audio_url`, `video_url`, and `font_url` to assets tag helper. These URL helpers will return the full path to your assets. This is useful when you are going to reference this asset from external host.
* Remove slash from favicon_link_tag method attributeLucas Caton2012-01-311-1/+1
|
* reuse common video/audio tags code and do not modify optionsSergey Nartimov2012-01-261-0/+8
|
* do not modify options in image_tagSergey Nartimov2012-01-261-0/+6
|
* allow to pass multiple sources to audio/video tags without using arraySergey Nartimov2012-01-251-0/+2
|
* Make audio_tag able to receive multiple sourcesJanko Marohnić2012-01-251-0/+2
|
* Make path_to_video in video_tag apply to each sourceJanko Marohnić2012-01-251-2/+2
|
* escape options for the stylesheet_link_tag methodAlexey Vakhov2011-09-251-0/+4
|
* Use shorter class-level File methods instead of going through File.stat.thedarkone2011-07-251-2/+2
|
* Changed a few instances of of words in the API docs written in British ↵Oemuer Oezkir2011-07-241-1/+1
| | | | | | English to American English(according to Weber)
* use Zlib.crc2 rather that bytes.sum, as per Aaron's suggestionXavier Noria2011-07-081-1/+2
| | | | | | That integer is rather irrelevant, the only thing that matters is that it is consistent and with no apparent bias. Zlib.crc32 is 8-10 times faster than bytes.sum, so use that.
* removing brittle assertionAaron Patterson2011-07-071-1/+0
|
* Using the sum of bytes instead the hash of the path when replacing the ↵Albert Callarisa Roca2011-07-081-2/+3
| | | | wildcard of the assets path because in ruby 1.9 is not consistent
* Merge pull request #1870 from chriseppstein/asset_urls_masterSantiago Pastorino2011-06-271-10/+20
|\ | | | | Asset urls master
| * Added a configuration setting:Chris Eppstein2011-06-271-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | config.action_controller.default_asset_host_protocol It's best to leave this unset. When unset the :request protocol is used whenever it can be and :relative is used in the other situations. When set to :request then assets hosts will be disabled when there is no request in scope and will use the request protocol whenever a request is in scope. If set to :relative, then a relative protocol is always used except for stylesheet link tags which must use the :request protocol to avoid double downloads in IE6&7. Conflicts: actionpack/lib/sprockets/helpers/rails_helper.rb actionpack/test/template/sprockets_helper_test.rb
| * Stylesheet link tags should use the request protocol to avoid duplicate ↵Chris Eppstein2011-06-271-8/+8
| | | | | | | | | | | | | | | | | | download of stylesheets in IE7 and IE8. Conflicts: actionpack/lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb actionpack/lib/sprockets/helpers/rails_helper.rb
| * Add asset_url helper and refactor the asset paths so that asset hosts can be ↵Chris Eppstein2011-06-271-4/+4
| | | | | | | | | | | | | | | | | | | | used during asset precompilation. Conflicts: actionpack/lib/action_view/asset_paths.rb actionpack/lib/sprockets/helpers/rails_helper.rb actionpack/test/template/sprockets_helper_test.rb
* | the generated ALT attribute for images no longer contains the digest, if anyXavier Noria2011-06-271-0/+8
|/
* asset helpers should understand scheme-relative URLsChad Krsek2011-04-261-0/+15
|
* Revert "asset helpers should understand scheme-relative URLs"Chad Krsek2011-04-251-15/+0
| | | | This reverts commit 057412ce38ead06307a887dca333837a99f84f22.
* asset helpers should understand scheme-relative URLsChad Krsek2011-04-251-0/+15
|
* Make static faster as we don't have to serve multiple paths anymore.José Valim2011-04-151-23/+0
|