Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Explicity set properties to not be required, since the default can be

changed using DataMapper::Property.required(true)
  • Loading branch information...
commit 1e2a2c901ef51f86ca9ee15876681df012cc0d1c 1 parent b8f0747
@xaviershay xaviershay authored solnic committed
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/dm-paperclip.rb
View
1  lib/dm-paperclip.rb
@@ -295,6 +295,7 @@ def attachment_definitions=(opts)
@attachment_definitions[name] = {:validations => []}.merge(options)
property_options = options.delete_if { |k,v| ![ :public, :protected, :private, :accessor, :reader, :writer ].include?(key) }
+ property_options[:required] = false
property :"#{name}_file_name", String, property_options.merge(:length => 255)
property :"#{name}_content_type", String, property_options.merge(:length => 255)
Please sign in to comment.
Something went wrong with that request. Please try again.