episode-178/todo/vendor/plugins/paperclip/lib/paperclip.rb
# Places ActiveRecord-style validations on the presence of a file.
# Options:
# * +if+: A lambda or name of a method on the instance. Validation will only
#   be run is this lambda or method returns true.
# * +unless+: Same as +if+ but validates if lambda or method returns false.
Places ActiveRecord-style validations on the presence of a file.
Options:
+if+: A lambda or name of a method on the instance. Validation will only
be run is this lambda or method returns true.
+unless+: Same as +if+ but validates if lambda or method returns false.
Places ActiveRecord - style validations on the presence of a file . Options : + if + : A lambda or name of a method on the instance . Validation will only be run is this lambda or method returns true . + unless + : Same as + if + but validates if lambda or method returns false .
def validates_attachment_presence name, options = {}
      message = options[:message] || "must be set."
      attachment_definitions[name][:validations] << [:presence, {:message => message,
                                                                 :if      => options[:if],
                                                                 :unless  => options[:unless]}]
    end
def validates_attachment_presence name , options = { } message = options [ :message ] || "must be set." attachment_definitions [ name ] [ :validations ] << [ :presence , { :message => message , :if => options [ :if ] , :unless => options [ :unless ] } ] end
Places ActiveRecord-style validations on the presence of a file.
Places ActiveRecord - style validations on the presence of a file .
name
options