Sha256: 846a7fcdd522f400ad1ef701c1a1921b392a1211878afd49d3fe4fca24e6a46e
Contents?: true
Size: 462 Bytes
Versions: 4
Compression:
Stored size: 462 Bytes
Contents
# frozen_string_literal: true class Tramway::User::User < ::Tramway::Core::ApplicationRecord has_secure_password has_many :social_networks, as: :record, class_name: 'Tramway::Profiles::SocialNetwork' if defined? Tramway::Conference # FIXME: replace to tramway-admin enumerize :role, in: %i[user admin], default: :admin def admin? role.admin? end scope :admins, -> { where role: :admin } scope :simple_users, -> { where role: :user } end
Version data entries
4 entries across 4 versions & 1 rubygems