module RailsAppcache::ApplicationHelper
Public Instance Methods
appcache_manifest_path(path)
click to toggle source
# File lib/rails_appcache/application_helper.rb, line 3 def appcache_manifest_path(path) return "" unless RailsAppcache.config.perform_caching? "/#{path}-#{appcache_version_string}.appcache" end
appcache_version_string()
click to toggle source
In development, serve up a new manifest every time In production, serve the current Git revision
# File lib/rails_appcache/application_helper.rb, line 11 def appcache_version_string RailsAppcache.config.version end
asset_cache_path(path)
click to toggle source
# File lib/rails_appcache/application_helper.rb, line 29 def asset_cache_path(path) asset_path(path) end
javascript_cache_path(*paths)
click to toggle source
# File lib/rails_appcache/application_helper.rb, line 22 def javascript_cache_path(*paths) tags = javascript_include_tag(*paths) tags.scan(/src="(.*?)"/).map do |match| match[0].html_safe end.join("\n") end
stylesheet_cache_path(*paths)
click to toggle source
# File lib/rails_appcache/application_helper.rb, line 15 def stylesheet_cache_path(*paths) tags = stylesheet_link_tag(*paths) tags.scan(/href="(.*?)"/).map do |match| match[0].html_safe end.join("\n") end