mirror of
https://github.com/internetee/registry.git
synced 2025-07-29 22:16:19 +02:00
Created user admin scope
This commit is contained in:
parent
807c537f67
commit
0ad2fd5a1b
2 changed files with 3 additions and 1 deletions
|
@ -3,6 +3,8 @@ class User < ApplicationRecord
|
|||
|
||||
has_many :actions, dependent: :restrict_with_exception
|
||||
|
||||
scope :admin, -> { where("'admin' = ANY (roles)") }
|
||||
|
||||
attr_accessor :phone
|
||||
|
||||
self.ignored_columns = %w[legacy_id]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue