1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

16 commits

Author SHA1 Message Date
Marc-Andre Lafortune
d3bc12b27f Handle correctly optional parameters for callable asset_host. 2011-11-29 02:01:18 -05:00
José Valim
87c57bb88f Fix the lame config.action_controller.present? check scattered throughout assets_path.
Conflicts:

	actionpack/test/template/sprockets_helper_test.rb
2011-10-05 02:35:43 +02:00
José Valim
5711a35ad8 Ensure default_asset_host_protocol is respected, closes #2980. 2011-10-05 02:08:02 +02:00
Santiago Pastorino
da7f0426ec Allow asset tag helper methods to accept :digest => false option in order to completely avoid the digest generation. 2011-09-14 15:02:17 -07:00
Santiago Pastorino
ae04fbfee9 Fix asset_path relative_url_root method 2011-09-13 02:45:05 -07:00
Santiago Pastorino
5bad79d930 always rewrite_relative_url_root 2011-09-13 00:27:29 -07:00
Guillermo Iguaran
f746927889 Remove odd asignation 2011-09-12 13:16:55 -05:00
Milan Dobrota
9b08afd2f4 if ... nil? is more expensive than unless 2011-09-04 10:44:08 -05:00
Vishnu Atrai
525fd3ac86 TODO fix explicitly loading exceptations, autoload removed 2011-07-11 13:14:02 +05:30
Xavier Noria
ad912c08a9 use Zlib.crc2 rather that bytes.sum, as per Aaron's suggestion
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.
2011-07-08 00:58:14 +02:00
Albert Callarisa Roca
f6a6b51ae5 Using the sum of bytes instead the hash of the path when replacing the wildcard of the assets path because in ruby 1.9 is not consistent 2011-07-08 00:10:20 +08:00
Chris Eppstein
024bed387b Added a configuration setting:
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
2011-06-27 13:58:51 -07:00
Chris Eppstein
2cc1bc3773 Move the config bootstrapping to initialization to minimize access to the Rails.application global. 2011-06-27 13:55:10 -07:00
Chris Eppstein
6c64e1e3a3 Stylesheet link tags should use the request protocol to avoid duplicate 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
2011-06-27 13:54:54 -07:00
Chris Eppstein
96137e8bd0 Add asset_url helper and refactor the asset paths so that asset hosts can be 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
2011-06-27 13:48:36 -07:00
José Valim
354709fe89 Rename AV::Helpers::AssetPaths to AV::AssetPaths to solve autoload mess. 2011-06-21 11:24:05 -03:00