Permalink
Browse files

Merge branch 'fix_fog_public' of https://github.com/metaskills/paperclip

  • Loading branch information...
2 parents cd53485 + de9a94a commit cd577da4d022fa87683e2cd792208dc7d523f4cc @mike-burns mike-burns committed Oct 21, 2011
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

0 comments on commit cd577da

Please sign in to comment.