aboutsummaryrefslogtreecommitdiff
path: root/app/models/user.rb
blob: d45aa8b2edc619629eac26e8eda9809cb300c1b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# SPDX-FileCopyrightText: 2020 IN COMMON Collective <collective@incommon.cc>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

class User < ApplicationRecord
  has_many :agencies
  has_many :agents, through: :agencies, source: :agent

  include UsersHelper

  def avatar_url
    attributes['avatar_url'].present? ?
      attributes['avatar_url'] : '' # default_user_avatar_url
  end
end