Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Allow :fog_public to be set to false and read as false from #fog_publ…

…ic accessor.
  • Loading branch information...
commit de9a94a5d0cc3a8a8572c4bef595ed04461cff29 1 parent 94d35f9
@metaskills metaskills authored
Showing with 3 additions and 1 deletion.
  1. +2 −1  lib/paperclip/storage/fog.rb
  2. +1 −0  test/fog_test.rb
View
3  lib/paperclip/storage/fog.rb
@@ -68,7 +68,8 @@ def fog_file
end
def fog_public
- @fog_public ||= @options.fog_public || true
+ return @fog_public if defined?(@fog_public)
+ @fog_public = defined?(@options.fog_public) ? @options.fog_public : true
end
def flush_writes
View
1  test/fog_test.rb
@@ -182,6 +182,7 @@ class FogTest < Test::Unit::TestCase
should 'set the @fog_public instance variable to false' do
assert_equal false, @dummy.avatar.options.fog_public
+ assert_equal false, @dummy.avatar.fog_public
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.