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

Commit

Permalink
Remove unused :validations option
Browse files Browse the repository at this point in the history
Fixes #786
  • Loading branch information
sikachu committed Mar 30, 2012
1 parent 6c5fe19 commit e1951ed
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
1 change: 0 additions & 1 deletion 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
Expand Down
13 changes: 0 additions & 13 deletions test/attachment_options_test.rb
Expand Up @@ -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
Expand Down

0 comments on commit e1951ed

Please sign in to comment.