Skip to content

Commit

Permalink
Merge branch 'fix_fog_public' of https://github.com/metaskills/paperclip
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-burns committed Oct 21, 2011
2 parents cd53485 + de9a94a commit cd577da
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 cd577da

Please sign in to comment.