Sha256: 15c00a604c7aedd9597dc929321310fcc0bd287659672da97f640a00eb151f4c
Contents?: true
Size: 573 Bytes
Versions: 31
Compression:
Stored size: 573 Bytes
Contents
class UserAttribute < ActiveRecord::Base belongs_to :user # Finds the user_attributes based on login # @param [sting] login the login of the user # @return the user attribute object or nil def self.find_by_login(login) user = User.find_by_login(login) if user UserAttribute.find_by_user_id(user.id) else nil end end # Concatenates first and last name # @return [string] the first_name + last_name def full_name fn = first_name.nil? ? "" : first_name ln = last_name.nil? ? "" : last_name [fn, ln].join(" ").strip end end
Version data entries
31 entries across 31 versions & 1 rubygems