osm 1.2.18 → 1.2.19
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.
- data/CHANGELOG.md +4 -0
- data/lib/osm/member.rb +7 -5
- data/version.rb +1 -1
- metadata +1 -1
data/CHANGELOG.md
CHANGED
data/lib/osm/member.rb
CHANGED
|
@@ -105,19 +105,21 @@ module Osm
|
|
|
105
105
|
:contact, :primary_contact, :secondary_contact, :emergency_contact, :doctor
|
|
106
106
|
end
|
|
107
107
|
|
|
108
|
+
unless ActiveModel::VERSION::MAJOR < 4
|
|
109
|
+
validates_presence_of :grouping_label, :allow_blank => true
|
|
110
|
+
validates_presence_of :grouping_leader_label, :allow_blank => true
|
|
111
|
+
validates_presence_of :additional_information, :allow_blank => true
|
|
112
|
+
validates_presence_of :additional_information_labels, :allow_blank => true
|
|
113
|
+
validates_presence_of :finished_section, :allow_nil=>true
|
|
114
|
+
end
|
|
108
115
|
validates_numericality_of :id, :only_integer=>true, :greater_than=>0, :unless => Proc.new { |r| r.id.nil? }
|
|
109
116
|
validates_numericality_of :section_id, :only_integer=>true, :greater_than=>0
|
|
110
117
|
validates_numericality_of :grouping_id, :only_integer=>true, :greater_than_or_equal_to=>-2
|
|
111
118
|
validates_numericality_of :grouping_leader, :only_integer=>true, :greater_than_or_equal_to=>0, :less_than_or_equal_to=>14, :allow_nil => true
|
|
112
119
|
validates_presence_of :first_name
|
|
113
120
|
validates_presence_of :last_name
|
|
114
|
-
validates_presence_of :grouping_label, :allow_blank => true
|
|
115
|
-
validates_presence_of :grouping_leader_label, :allow_blank => true
|
|
116
|
-
validates_presence_of :additional_information, :allow_blank => true
|
|
117
|
-
validates_presence_of :additional_information_labels, :allow_blank => true
|
|
118
121
|
validates_presence_of :date_of_birth
|
|
119
122
|
validates_presence_of :started_section
|
|
120
|
-
validates_presence_of :finished_section, :allow_nil=>true
|
|
121
123
|
validates_presence_of :joined_movement
|
|
122
124
|
validates_format_of :age, :with => /\A[0-9]{1,3} \/ (?:0?[0-9]|1[012])\Z/, :message => 'age is not in the correct format (yy / mm)', :allow_blank => true
|
|
123
125
|
validates_inclusion_of :gender, :in => [:male, :female, :other, :unspecified], :allow_nil => true
|
data/version.rb
CHANGED