Sha256: 2cb4c7debf669cd12d310af0c39cb32efebc7e9abbc8b88f8796cf18c6d7b467
Contents?: true
Size: 310 Bytes
Versions: 4
Compression:
Stored size: 310 Bytes
Contents
class Tramway::User::User < ::Tramway::Core::ApplicationRecord has_secure_password # FIXME replace to tramway-admin enumerize :role, in: [ :user, :admin ], default: :user 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