Permalink
Browse files

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

…ic accessor.
  • Loading branch information...
1 parent 94d35f9 commit de9a94a5d0cc3a8a8572c4bef595ed04461cff29 @metaskills metaskills committed Oct 17, 2011
Showing with 3 additions and 1 deletion.
  1. +2 −1 lib/paperclip/storage/fog.rb
  2. +1 −0 test/fog_test.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
@@ -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 de9a94a

Please sign in to comment.