Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Remove unused `:validations` option

Fixes #786
  • Loading branch information...
commit e1951ed0ef7bff9494a548e4a3dd2ce98ee6dfea 1 parent 6c5fe19
@sikachu sikachu authored
View
1  lib/paperclip/attachment_options.rb
@@ -1,7 +1,6 @@
module Paperclip
class AttachmentOptions < Hash
def initialize(options)
- options = {:validations => []}.merge(options)
options.each do |k, v|
self.[]=(k, v)
end
View
13 test/attachment_options_test.rb
@@ -5,19 +5,6 @@ class AttachmentOptionsTest < Test::Unit::TestCase
assert_kind_of Hash, Paperclip::AttachmentOptions.new({})
end
- should "add a default empty validations" do
- options = {:arbi => :trary}
- expected = {:validations => []}.merge(options)
- actual = Paperclip::AttachmentOptions.new(options).to_hash
- assert_equal expected, actual
- end
-
- should "not override validations if passed to initializer" do
- options = {:validations => "something"}
- attachment_options = Paperclip::AttachmentOptions.new(options)
- assert_equal "something", attachment_options[:validations]
- end
-
should "respond to []" do
assert Paperclip::AttachmentOptions.new({}).respond_to?(:[])
end

0 comments on commit e1951ed

Please sign in to comment.
Something went wrong with that request. Please try again.