Skip to content
Browse files

relative_path_from needs to be called on a Pathname, not a string

  • Loading branch information...
1 parent ad75707 commit 35deab754acec42f9082ab7a92e884f90d8a8fc0 @twinge twinge committed with Apr 16, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/rack-offline.rb
View
4 lib/rack-offline.rb
@@ -1,7 +1,7 @@
require "rack/offline"
module Rails
- class Offline < ::Rack::Offline
+ class Offline < Rack::Offline
def self.call(env)
@app ||= new
@app.call(env)
@@ -31,7 +31,7 @@ def cache_block(root)
"#{root}/stylesheets/**/*.css",
"#{root}/javascripts/**/*.js",
"#{root}/images/**"]
-
+
files.each do |file|
cache Pathname.new(file).relative_path_from(root)
end

0 comments on commit 35deab7

Please sign in to comment.
Something went wrong with that request. Please try again.