app/models/people/person.rb
def address_block(delimiter = "\n", options = {})
    return read_attribute(:address_block) unless read_attribute(:address_block).blank?
    a = "#{formal_fullname}"
    if box_no.blank?
      a << "#{delimiter}#{address1}"
      a << "#{delimiter}#{address2}" unless address2.blank?
      a << "#{delimiter}#{address3}" unless address3.blank?
      a << "#{delimiter}" unless city.blank? || state.blank? || zip.blank?
      a << "#{city}" unless city.blank?
      a << ", " unless city.blank? && state.blank?
      a << "#{state} "
      a << "#{zip}"
    else
      a << "#{delimiter}Box #{box_no}"
    end
    a
  end
# Returns a formatted address block for this person, including name. Depending on whether or not this person has a custom address 
# block defined in the +address_block+ attribute, this method will either construct an address block from the other address details
# or simply return the custom address block from the database. If this person has a box number defined, then we simply return the 
# name and box number.
Returns a formatted address block for this person, including name. Depending on whether or not this person has a custom address
block defined in the +address_block+ attribute, this method will either construct an address block from the other address details
or simply return the custom address block from the database. If this person has a box number defined, then we simply return the
name and box number.
Returns a formatted address block for this person including name . Depending on whether or not this person has a custom address block defined in the + address_block + attribute this method will either construct an address block from the other address details or simply return the custom address block from the database . If this person has a box number defined then we simply return the name and box number .
def address_block(delimiter = "\n", options = {})
    return read_attribute(:address_block) unless read_attribute(:address_block).blank?
    a = "#{formal_fullname}"
    if box_no.blank?
      a << "#{delimiter}#{address1}"
      a << "#{delimiter}#{address2}" unless address2.blank?
      a << "#{delimiter}#{address3}" unless address3.blank?
      a << "#{delimiter}" unless city.blank? || state.blank? || zip.blank?
      a << "#{city}" unless city.blank?
      a << ", " unless city.blank? && state.blank?
      a << "#{state} "
      a << "#{zip}"
    else
      a << "#{delimiter}Box #{box_no}"
    end
    a
  end
def address_block ( delimiter = "\n" , options = { } ) return read_attribute ( :address_block ) unless read_attribute ( :address_block ) . blank? a = "#{formal_fullname}" if box_no . blank? a << "#{delimiter}#{address1}" a << "#{delimiter}#{address2}" unless address2 . blank? a << "#{delimiter}#{address3}" unless address3 . blank? a << "#{delimiter}" unless city . blank? || state . blank? || zip . blank? a << "#{city}" unless city . blank? a << ", " unless city . blank? && state . blank? a << "#{state} " a << "#{zip}" else a << "#{delimiter}Box #{box_no}" end a end
Returns a formatted address block for this person, including name.
Returns a formatted address block for this person including name .
delimiter
options