sexy_validations 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
@@ -3,7 +3,14 @@ module SexyValidations
3
3
  module Validators
4
4
  class Presence
5
5
  def self.validate(model, attribute, value, options)
6
- return unless value.blank?
6
+ real_value = case value.class.name
7
+ when "Sequel::Plugins::Paperclip::Attachment"
8
+ value.queued_file
9
+ else
10
+ value
11
+ end
12
+
13
+ return unless real_value.blank?
7
14
 
8
15
  model.errors.add(attribute, "muss ausgefüllt werden")
9
16
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{sexy_validations}
8
- s.version = "0.3.0"
8
+ s.version = "0.3.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Corin Langosch"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 0
9
- version: 0.3.0
8
+ - 1
9
+ version: 0.3.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Corin Langosch