lib/pupa/models/post.rb in pupa-0.1.7 vs lib/pupa/models/post.rb in pupa-0.1.8

- old
+ new

@@ -8,19 +8,19 @@ include Concerns::Timestamps include Concerns::Sourceable include Concerns::Contactable include Concerns::Linkable - attr_accessor :label, :role, :organization_id, :start_date, :end_date - dump :label, :role, :organization_id, :start_date, :end_date + attr_accessor :label, :other_label, :role, :organization_id, :area_id, :start_date, :end_date + dump :label, :other_label, :role, :organization_id, :area_id, :start_date, :end_date - foreign_key :organization_id + foreign_key :organization_id, :area_id - # Returns the post's label and organization ID. + # Returns the post's label or role and organization ID. # - # @return [String] the post's label and organization ID + # @return [String] the post's label or role and organization ID def to_s - "#{label} in #{organization_id}" + "#{label || role} in #{organization_id}" end # A post should have a unique label within an organization, through it may # share a label with a historical post. def fingerprint