lib/osm/member.rb in osm-0.1.14 vs lib/osm/member.rb in osm-0.1.15
- old
+ new
@@ -72,12 +72,12 @@
# @return [String] the custom9 data for the member
# @!attribute [rw] grouping_id
# @return [Fixnum] the grouping within the section that the member belongs to
# @!attribute [rw] grouping_leader
# @return [Fixnum] whether the member is the grouping leader (0=no, 1=seconder/APL, 2=sixer/PL)
- # @!attribute [rw] grouping_name
- # @return [Fixnum] the grouping within the section that the member belongs to
+ # @!attribute [rw] grouping
+ # @return [Fixnum] the grouping within the section that the member belongs to (as displayed in OSM, if member was retrieved from OSM)
# @!attribute [rw] joined
# @return [Date] when the member joined the section
# @!attribute [rw] age
# @return [String] the member's current age (yy/mm)
# @!attribute [rw] joined_years
@@ -116,21 +116,21 @@
attribute :custom6, :type => String, :default => ''
attribute :custom7, :type => String, :default => ''
attribute :custom8, :type => String, :default => ''
attribute :custom9, :type => String, :default => ''
attribute :grouping_id, :type => Integer
- attribute :grouping_name, :type => String, :default => ''
+ attribute :grouping, :type => String, :default => ''
attribute :grouping_leader, :type => Integer
attribute :joined, :type => Date
attribute :age, :type => String
attribute :joined_years, :type => Integer
attr_accessible :id, :section_id, :type, :first_name, :last_name, :email1, :email2, :email3, :email4,
:phone1, :phone2, :phone3, :phone4, :address, :address2, :date_of_birth, :started,
:joining_in_years, :parents, :notes, :medical, :religion, :school, :ethnicity, :subs,
:custom1, :custom2, :custom3, :custom4, :custom5, :custom6, :custom7, :custom8, :custom9,
- :grouping_id, :grouping_name, :grouping_leader, :joined, :age, :joined_years
+ :grouping_id, :grouping, :grouping_leader, :joined, :age, :joined_years
validates_numericality_of :id, :only_integer=>true, :greater_than=>0, :unless => Proc.new { |r| r.id.nil? }
validates_numericality_of :section_id, :only_integer=>true, :greater_than=>0
validates_numericality_of :grouping_id, :only_integer=>true, :greater_than_or_equal_to=>-2
validates_numericality_of :grouping_leader, :only_integer=>true, :greater_than_or_equal_to=>0, :less_than_or_equal_to=>2
@@ -198,10 +198,10 @@
:custom6 => item['custom6'],
:custom7 => item['custom7'],
:custom8 => item['custom8'],
:custom9 => item['custom9'],
:grouping_id => Osm::to_i_or_nil(item['patrolid']),
- :grouping_name => item['patrol'],
+ :grouping => item['patrol'],
:grouping_leader => Osm::to_i_or_nil(item['patrolleader']),
:joined => Osm::parse_date(item['joined']),
:age => item['age'].gsub(' ', ''),
:joined_years => item['yrs'].to_i,
)