Sha256: 2ded2966f83a4e9f61c60c5a888cc4a444a90c3ff52738855ff81cd11e00bd84
Contents?: true
Size: 721 Bytes
Versions: 13
Compression:
Stored size: 721 Bytes
Contents
class Contact < Reference safe_method :fullname => String, :initials => String class << self def version_class ContactVersion end # Class list to which this class can change to def change_to_classes_for_form classes_for_form(:class => 'Contact') end end def filter_attributes(new_attributes) attributes = super if self[:name].blank? && attributes['name'].blank? && (attributes['c_name'] || attributes['c_first_name']) attributes.merge('name' => (attributes['c_first_name'].to_s + ' ' + attributes['c_name'].to_s)) else attributes end end def fullname version.content.fullname end def initials version.content.initials end end
Version data entries
13 entries across 13 versions & 1 rubygems