mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Refactored contact with ability
This commit is contained in:
parent
62f8061e10
commit
96d1c60dd8
33 changed files with 763 additions and 1045 deletions
|
@ -13,6 +13,11 @@ class ApiUser < User
|
|||
|
||||
attr_accessor :registrar_typeahead
|
||||
|
||||
def ability
|
||||
@ability ||= Ability.new(self)
|
||||
end
|
||||
delegate :can?, :cannot?, to: :ability
|
||||
|
||||
def registrar_typeahead
|
||||
@registrar_typeahead || registrar || nil
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue