aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/asset_tag_helper.rb
Commit message (Collapse)AuthorAgeFilesLines
* Tidy up asset tag a bit and make railties tests green again.José Valim2010-06-231-24/+14
|
* refactored the javascript asset tag helpers and moved the default scripts ↵Josh Kalderimis2010-06-231-14/+5
| | | | | | setup within the railtie Signed-off-by: José Valim <jose.valim@gmail.com>
* removed 'unless const_defined?' code smellJosh Kalderimis2010-06-211-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Adds title and description where needed.Rizwan Reza2010-06-161-0/+1
|
* Updating image_tag to support cid:content_id "URLs"Mikel Lindsaar2010-06-071-2/+5
|
* fix documentation typoMarius Nuennerich2010-05-181-2/+2
| | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
* Accept :alt => nil on image_tag [#4558 state:resolved]Marc-Andre Lafortune2010-05-151-1/+1
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Fix a typo in the documentation. [#4318 state:resolved]Craig R Webster2010-04-121-1/+1
| | | Signed-off-by: wycats <wycats@gmail.com>
* image_path -> path_to_image in a couple of places, plus motivation for ↵Xavier Noria2010-04-091-10/+13
| | | | path_to_image in rdoc
* adds #favicon_link_tag back, rdoc explains why it is useful, and how to get ↵Xavier Noria2010-04-081-0/+34
| | | | a link for Mobile Safari with it
* Revert "adds #favicon_link_tag and #apple_touch_icon_link_tag" -- these tags ↵David Heinemeier Hansson2010-04-081-44/+0
| | | | | | are too specific. This reverts commit 6891f46d10957f21f200fc4dc2b6076ff411b1da, ec8610cfdc32d0fe816fb22405e00ef1b6c90d73, and d18ff1b7efd96e7c08bc1a15137735be45f87e07.
* adds a default source to #apple_touch_icon_link_tagXavier Noria2010-04-071-6/+12
|
* new helpers #favicon_link_tag and #apple_touch_icon_link_tagXavier Noria2010-04-071-0/+38
|
* Updated asset_template_path to asset_path and have it also support a String ↵wycats2010-03-281-10/+11
| | | | [#4247 state:resolved]
* Allow customisation of asset path generation using a proc.Craig R Webster2010-03-281-2/+66
| | | | | | | | | | | | | | | | Set config.action_controller.asset_path_template to a proc that takes one argument - the direct, unchanged asset path - and returns a path to that asset using the scheme that your assets require. This is useful if you have a setup which scales by introducing new application servers where the mtime of the asset files may not be the same as those of the asset files on your previous servers, but it does require your web servers to have knowledge of the asset template paths that you rewrite to so it's not suitable for out-of-the-box use. An example of configuring asset path generation and rewriting these paths using Apache is included in actionpack/lib/action_view/helpers/asset_tag_helper.rb. Signed-off-by: wycats <wycats@gmail.com>
* Merge branch 'master' into docrailswycats2010-03-261-26/+23
|\
| * cleans a bit #compute_public_pathXavier Noria2010-03-191-26/+23
| | | | | | | | | | | | [#4232 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* | Updated ActionController::Base.asset_host exampleretr0h2010-03-251-2/+2
|/ | | | | | | | The example provided contrived. It is not useful when wanting to use 1-based asset hosts (since it would generate a random asset host for the same asset). Signed-off-by: Rizwan Reza <rizwanreza@gmail.com>
* Made asset_tag_helper use config.perform_caching instead of ↵Denis Odorcic2010-03-121-14/+14
| | | | | | ActionController::Base.perform_caching Signed-off-by: José Valim <jose.valim@gmail.com>
* simplify alt tag generation for imagesEaden McKee2010-03-111-2/+2
| | | | | | [#2837 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Fix a bunch of failing AP / AM specs created from the previous ↵Carl Lerche2010-03-041-1/+1
| | | | AbstractController configuration refactor.
* Start refactoring the method of configuring ActionViewCarlhuda2010-03-031-7/+0
|
* Work on deprecating ActionController::Base.relative_url_rootCarlhuda2010-03-031-2/+2
|
* For performance reasons, you can no longer call html_safe! on Strings. ↵Yehuda Katz2010-01-311-3/+3
| | | | | | | | | | | | Instead, all Strings are always not html_safe?. Instead, you can get a SafeBuffer from a String by calling #html_safe, which will SafeBuffer.new(self). * Additionally, instead of doing concat("</form>".html_safe), you can do safe_concat("</form>"), which will skip both the flag set, and the flag check. * For the first pass, I converted virtually all #html_safe!s to #html_safe, and the tests pass. A further optimization would be to try to use #safe_concat as much as possible, reducing the performance impact if we know up front that a String is safe.
* Include prototype ujs adapter with new appsJoshua Peek2010-01-301-1/+1
|
* Revert "Add rails.js driver to default source list"Joshua Peek2010-01-301-1/+1
| | | | This reverts commit 8a46e1182e3fce36aee5e6cb65737c4e755bbced.
* Add rails.js driver to default source listJoshua Peek2010-01-291-1/+1
|
* Make @controller an internal ivar in the viewJoshua Peek2010-01-221-4/+4
|
* Start adding configuration to ActionView instead of using constants.Yehuda Katz2009-10-141-12/+16
| | | | | | | By using config rather than hardcoded constants, we can evolve the configuration system over time (we'd just need to update the config method with more robust capabilities and all consumers would get the capabilities with no code changes)
* Switch to on-by-default XSS escaping for rails.Michael Koziarski2009-10-081-3/+3
| | | | | | | | | | | | This consists of: * String#html_safe! a method to mark a string as 'safe' * ActionView::SafeBuffer a string subclass which escapes anything unsafe which is concatenated to it * Calls to String#html_safe! throughout the rails helpers * a 'raw' helper which lets you concatenate trusted HTML from non-safety-aware sources (e.g. presantized strings in the DB) * New ERB implementation based on erubis which uses a SafeBuffer instead of a String Hat tip to Django for the inspiration.
* Don't force test suite to use bundlerJoshua Peek2009-09-131-0/+1
|
* Don't raise exceptions for missing javascript_include_tag or ↵Sam Pohlenz2009-09-031-2/+6
| | | | | | stylesheet_link_tag sources unless the :cache or :concat options are given. [#2738 state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Make sure javascript_include_tag/stylesheet_link_tag does not append ".js" ↵Matthew Rudy Jacobs2009-08-051-10/+14
| | | | | | or ".css" onto external urls [#1664 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Fix tag helpers so that all HTML element boolean attributes render according ↵Marc Love2009-07-301-1/+1
| | | | | | to the specs. Added all boolean attributes listed in the XHTML 1.0 specs (http://www.w3.org/TR/xhtml1/guidelines.html) and HTML 5 specs (http://www.whatwg.org/specs/web-apps/current-work). HTML 5 boolean attribute rendering was broken in commit 1e2d7229602f467cfdc0ef606b5ef8a5566a1501 / [#2864 state:resolved]. Signed-off-by: Yehuda Katz <wycats@gmail.com>
* Adds a audio_tag helper for the HTML5 audio tag. Fixed video_path docs. HTML ↵Emilio Tagua2009-07-071-3/+35
| | | | | | attributes values should be true or false not attribute's name. [#2864 state:resolved] Signed-off-by: Yehuda Katz <wycats@yehuda-katzs-macbookpro41.local>
* Removed unnecessary calls to image_path and hash lookups [#2827 state:resolved]Yehuda Katz + Carl Lerche2009-07-021-3/+3
|
* Adds a video_tag helper for the HTML5 video tag (similar to how the ↵Tieg Zaharia2009-07-021-0/+67
| | | | | | image_tag works) (tests included); removes a duplicate test line for image_tag; adds boolean attributes for video tag to tag()'s boolean attributes Signed-off-by: Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com>
* Handle missing javascript/stylesheets assets by raising an exceptionChristos Zisopoulos2009-06-261-4/+28
| | | | | | | | | | | | An exception will be raised if a local javascript/stylesheet file included by the stylesheet_link_tag or javascript_include_tag can not be found. When caching is enabled, we use atomic_write to ensure that the cache file is not created with zero length. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#2738 state:committed]
* Add :concat option to asset tag helpers to force concatenation.Joshua Peek2009-06-151-6/+18
| | | | | This is useful for working around IE's stylesheet limit. stylesheet_link_tag :all, :concat => true
* allow absolute paths for the asset cachesAndrew Kaspick2009-06-111-3/+3
| | | | Signed-off-by: Michael Koziarski <michael@koziarski.com>
* Eliminate unnecessary File.exist? when correct file extension given [#1879 ↵Andrew White2009-02-051-1/+2
| | | | | | state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Merge docrailsPratik Naik2009-01-181-50/+74
|
* Cache AssetTag timestampsJoshua Peek2009-01-041-5/+31
|
* Revert to the good old days when AssetTag didn't cause anyone problemsJoshua Peek2009-01-021-325/+131
|
* Fixed the AssetTagHelper cache to use the computed asset host as part of the ↵David Heinemeier Hansson2009-01-011-5/+5
| | | | cache key instead of just assuming the its a string [#1299 state:committed]
* Ensure ActionMailer doesn't blow up when a two argument proc is set for the ↵Tekin Suleyman2008-12-011-1/+1
| | | | | | | asset host Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1394 state:committed]
* Make sure #compute_public_path caching allows to return different results ↵Sven Fuchs2008-11-291-1/+1
| | | | | | for different given sources [#1471 state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Added the option to declare an asset_host as an object that responds to call ↵David Heinemeier Hansson2008-11-271-3/+11
| | | | (see http://github.com/dhh/asset-hosting-with-minimum-ssl for an example) [DHH]
* need to make sure the asset type is cached with it in Cache.. name is ↵Aaron Batalion2008-11-191-2/+2
| | | | | | sufficient, not self Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Fixed asset host to not cache objects [#1419 state:resolved]Aaron Batalion2008-11-191-29/+35
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>