Sha256: 22339144478b5c0d390ebbaf2040d4adc72447540943fd8354631b7cbe47edec
Contents?: true
Size: 317 Bytes
Versions: 33
Compression:
Stored size: 317 Bytes
Contents
class Tramway::User::User < ::Tramway::Core::ApplicationRecord has_secure_password #FIXME remove repeating from tramway-user 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
33 entries across 33 versions & 1 rubygems