Sha256: e2238b3ffb7e00ab7ebeeb1961cc22aae32cf21faf138ee5c94428a39bcb2aa6
Contents?: true
Size: 462 Bytes
Versions: 2
Compression:
Stored size: 462 Bytes
Contents
class Person < ActiveRecord::Base include Merger validates_presence_of :first_name validates_presence_of :last_name default_scope :order => 'last_name, first_name, middle_name DESC' def full_name(*options) options = options.extract_options! if options[:last_name_first] "#{last_name}, #{first_name} #{middle_name}".squeeze(' ').strip else "#{first_name} #{middle_name} #{last_name}".squeeze(' ').strip end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
radiant-people-extension-1.1.0 | app/models/person.rb |
radiant-people-extension-1.0.0 | app/models/person.rb |