Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Support Sinatra 1.3 (with backward compat), closes #476

  • Loading branch information...
commit f03205cd5ff643b51d42467f94ab13be71f277b8 1 parent 6ce8571
@bensie bensie authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/carrierwave.rb
View
8 lib/carrierwave.rb
@@ -105,6 +105,12 @@ class Railtie < Rails::Railtie
elsif defined?(Sinatra)
- CarrierWave.root = Sinatra::Application.public
+ CarrierWave.root = if Sinatra::Application.respond_to?(:public_folder)
+ # Sinatra >= 1.3
+ Sinatra::Application.public_folder
+ else
+ # Sinatra < 1.3
+ Sinatra::Application.public
+ end
end
Please sign in to comment.
Something went wrong with that request. Please try again.