Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add features, fix bugs

  • Loading branch information...
commit 4833180c0f3c066f6e6e7727a0f4f89fedc3735c 1 parent e9e0196
@dolzenko authored
Showing with 15 additions and 7 deletions.
  1. +8 −4 README.md
  2. +7 −3 lib/rack/static_fallback.rb
View
12 README.md
@@ -12,9 +12,13 @@ Options:
Along the lines of the Capistrano conventions defaults to `%r{/system/(audios|photos|videos)}`
:fallback_static_url - URL of the production site
-To use with Rails add the following to your config/environments/development.rb:
+To use with Rails install as a plugin:
- config.middleware.insert_after(::Rack::Lock,
+ script/plugin install git://github.com/dolzenko/rack-static_fallback.git
+
+then add the following to your `config/environments/development.rb`
+
+ config.middleware.insert_after ::Rack::Lock,
::Rack::StaticFallback, :mode => :fallback,
- :static_path_regex => %r{/public/uploads}
- :fallback_static_url => "http://myproductionsite.com/")
+ :static_path_regex => %r{/system/uploads},
+ :fallback_static_url => "http://myproductionsite.com/"
View
10 lib/rack/static_fallback.rb
@@ -13,12 +13,16 @@ module Rack
# Along the lines of the Capistrano conventions defaults to `%r{/system/(audios|photos|videos)}`
# :fallback_static_url - URL of the production site
#
- # To use with Rails add the following to your config/environments/development.rb:
+ # To use with Rails install as a plugin:
#
- # config.middleware.insert_after(::Rack::Lock,
+ # script/plugin install git://github.com/dolzenko/rack-static_fallback.git
+ #
+ # then add the following to your `config/environments/development.rb`
+ #
+ # config.middleware.insert_after ::Rack::Lock,
# ::Rack::StaticFallback, :mode => :fallback,
# :static_path_regex => %r{/system/uploads},
- # :fallback_static_url => "http://myproductionsite.com/")
+ # :fallback_static_url => "http://myproductionsite.com/"
#
class StaticFallback
Please sign in to comment.
Something went wrong with that request. Please try again.