simple_descriptor 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -214,8 +214,8 @@ module SimpleDescriptor #:nodoc:
|
|
214
214
|
load_ar_descriptions if options[:load_desc]
|
215
215
|
yield if block_given?
|
216
216
|
required = described_as(:required)
|
217
|
-
required
|
218
|
-
send(:validates_presence_of,
|
217
|
+
required -= options[:ignore_required] if options[:ignore_required]
|
218
|
+
send(:validates_presence_of, required) if options[:required]
|
219
219
|
described_as(:limited).each { |field| validates_length_of field, :maximum => maxlength(field), :allow_nil => true } if options[:length]
|
220
220
|
if options[:numbers]
|
221
221
|
described_as(:integer).each { |field| validates_numericality_of field, :only_integer => true, :allow_nil => true } if options[:integer]
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: simple_descriptor
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.2.
|
7
|
-
date: 2007-
|
6
|
+
version: 0.2.3
|
7
|
+
date: 2007-10-17 00:00:00 +01:00
|
8
8
|
summary: add description to your classes and make your ActiveRecord validations smarter
|
9
9
|
require_paths:
|
10
10
|
- lib
|