Sha256: cff259677cfd702994ea2688493c41e7ef0b25aac8246ea16f10c85343aaaf0b
Contents?: true
Size: 1.24 KB
Versions: 4
Compression:
Stored size: 1.24 KB
Contents
# @deprecated - from the original implementation of UVA's Libra. This type of behavior should be application-specific. This will be removed no later than release 6.x require 'deprecation' class UserAttribute < ActiveRecord::Base belongs_to :user extend Deprecation self.deprecation_horizon = 'hydra-head 5.x' def initialize Deprecation.warn(UserAttribute, "UserAttribute is deprecated and will be removed from HydraHead in release 5 or 6; this behavior should be implemented at the app level.") super end # 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) Deprecation.warn(UserAttribute, "UserAttribute.find_by_login is deprecated and will be removed from HydraHead in release 5 or 6; this behavior should be implemented at the app level.") 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 deprecation_deprecate :full_name end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
hydra-head-4.1.3 | app/models/user_attribute.rb |
hydra-head-4.1.2 | app/models/user_attribute.rb |
hydra-head-4.1.1 | app/models/user_attribute.rb |
hydra-head-4.1.0 | app/models/user_attribute.rb |