Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
Allow :fog_public to be set to false and read as false from #fog_publ…
Browse files Browse the repository at this point in the history
…ic accessor.
  • Loading branch information
metaskills committed Oct 17, 2011
1 parent 94d35f9 commit de9a94a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/paperclip/storage/fog.rb
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions test/fog_test.rb
Expand Up @@ -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

Expand Down

0 comments on commit de9a94a

Please sign in to comment.