mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Provide a way to access to assets without using the digest, useful for static files and emails
This commit is contained in:
parent
11870117c6
commit
82afaa0686
3 changed files with 6 additions and 0 deletions
|
@ -43,6 +43,7 @@ namespace :assets do
|
|||
mkdir_p filename.dirname
|
||||
asset.write_to(filename)
|
||||
asset.write_to("#{filename}.gz") if filename.to_s =~ /\.(css|js)$/
|
||||
asset.write_to(target.join(logical_path))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
|
||||
*Rails 3.1.0 (unreleased)*
|
||||
|
||||
* Provide a way to access to assets without using the digest, useful for
|
||||
static files and emails. [Santiago Pastorino]
|
||||
|
||||
* The default database schema file is written as UTF-8. [Aaron Patterson]
|
||||
|
||||
* Generated apps with --dev or --edge flags depend on git versions of
|
||||
|
|
|
@ -58,7 +58,9 @@ module ApplicationTests
|
|||
Dir.chdir(app_path){ `bundle exec rake assets:precompile` }
|
||||
end
|
||||
files = Dir["#{app_path}/public/assets/application-*.js"]
|
||||
files << Dir["#{app_path}/public/assets/application.js"].first
|
||||
files << Dir["#{app_path}/public/assets/foo/application-*.js"].first
|
||||
files << Dir["#{app_path}/public/assets/foo/application.js"].first
|
||||
files.each do |file|
|
||||
assert_not_nil file, "Expected application.js asset to be generated, but none found"
|
||||
assert_equal "alert()", File.read(file)
|
||||
|
|
Loading…
Reference in a new issue