app/models/user.rb
# Don't use short_name unless you KNOW you should.
Don't use short_name unless you KNOW you should.
Don ' t use short_name unless you KNOW you should .
def short_name
    reload_all_values_if_missing([:given_name, :family_name])
    return given_name unless given_name.blank?
    return family_name unless family_name.blank?
    username
  end
def short_name reload_all_values_if_missing ( [ :given_name , :family_name ] ) return given_name unless given_name . blank? return family_name unless family_name . blank? username end
Don't use short_name unless you KNOW you should.
Don ' t use short_name unless you KNOW you should .