Refactored contact with ability

This commit is contained in:
Priit Tark 2015-02-17 01:38:36 +02:00
parent 62f8061e10
commit 96d1c60dd8
33 changed files with 763 additions and 1045 deletions

View file

@ -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