railscasts - rack::offline in rails 4.1 Issue -
railscasts - rack::offline in rails 4.1 Issue -
can give me quick solution please? have done this: routes:
offline = rack::offline.configure cache actioncontroller::base.helpers.asset_path("application.css") cache actioncontroller::base.helpers.asset_path("application.js") cache actioncontroller::base.helpers.asset_path("jquery.min.css") cache actioncontroller::base.helpers.asset_path("jquery.tmpl.min.css") cache actioncontroller::base.helpers.asset_path("style.js") # cache actioncontroller::base.helpers.asset_path("custom.css") network "/" end "/application.manifest" => offline
in application.html.erb:
<html manifest="/application.manifest">
in gemfile:
# gem 'rack-offline' # gem 'rack-offline', :github => 'pascalw/rack-offline' gem 'rack-offline', :git => 'https://github.com/wycats/rack-offline.git'
my rails version: 4.1.6
, ruby version: 2.1.3
this output @ http://localhost:3000/application.manifest
is:
cache manifest # a5a8232b037b9e6234e3db79ab4b2bff8fffecd76c4124f456273146f70631b0 /assets/application.css /assets/application.js network: /
i have added env["rails_asset_id"] = ""
in application.rb rails cast #247 offline apps part 1. please advise doing wrong??
routes.rb
offline = rack::offline.configure #cache "images/masthead.png" cache actioncontroller::base.helpers.asset_path("jquery.js") cache actioncontroller::base.helpers.asset_path("jquery_ujs.js") cache actioncontroller::base.helpers.asset_path("application.css") cache actioncontroller::base.helpers.asset_path("application.js") cacheactioncontroller::base.helpers.asset_path("jquery.offline.js") cache actioncontroller::base.helpers.asset_path("jquery.tmpl.min.js") cache actioncontroller::base.helpers.asset_path("json.js") cache actioncontroller::base.helpers.asset_path("offline_mode.js") network "/" end "/application.manifest" => offline
applicaiton.js this
//= require jquery //= require jquery_ujs //= require jquery.tmpl.min //= require jquery.offline //= require json //= require offline_mode //= require_tree .
offline-caching railscasts ruby-on-rails-4.1 offlineapps ruby-2.1.3
Comments
Post a Comment