midas-dynamic_validations 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -6,7 +6,7 @@ require 'dynamic_validations/validations'
6
6
  #require 'dynamic_validations/validation_rule'
7
7
 
8
8
  module DynamicValidations
9
- VERSION = '0.0.3'
9
+ VERSION = '0.0.4'
10
10
  end
11
11
 
12
12
  ActiveRecord::Base.send( :extend, DynamicValidations::ActMethods ) if defined?( ActiveRecord::Base )
@@ -81,11 +81,11 @@ module DynamicValidations
81
81
  #self.class.validates_each(attrs, options) do |record, attr, value|
82
82
  value = options[:tokenizer].call( value ) if value.kind_of?( String )
83
83
  unless !value.nil? and value.size.method( validity_checks[option] )[option_value]
84
- record.errors.add( attr, key, :default => custom_message, :count => option_value )
84
+ self.errors.add( attr, key, :default => custom_message, :count => option_value )
85
85
  end
86
86
  #end
87
87
  end
88
- end #def valiate_length
88
+ end #def validate_length
89
89
 
90
90
  def validate_numericality( *args )
91
91
  configuration = { :on => :save, :only_integer => false, :allow_nil => false }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: midas-dynamic_validations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - C. Jason Harrelson
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-10 00:00:00 -07:00
12
+ date: 2009-09-13 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency