def validates_attachment_presence name, options = {}
      message = options[:message] || "must be set."
      validates_presence_of :"#{name}_file_name",
                            :message   => message,
                            :if        => options[:if],
                            :unless    => options[:unless]
    end
def validates_attachment_presence name, options = {}
      message = options[:message] || "must be set."
      validates_presence_of :"#{name}_file_name",
                            :message   => message,
                            :if        => options[:if],
                            :unless    => options[:unless]
    end
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.