Skip to content

Commit

Permalink
fix ability on disposition updates whether tied to Asset or TransamAsset
Browse files Browse the repository at this point in the history
  • Loading branch information
mathmerized committed Sep 29, 2018
1 parent bd0fabb commit 84a0506
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/models/abilities/authorized_asset_event_ability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def initialize(user, organization_ids=[])
end

cannot :create, DispositionUpdateEvent do |ae|
!ae.asset.disposable?(false)
!ae.asset.try(:disposable?,false)
end


Expand All @@ -34,7 +34,7 @@ def initialize(user, organization_ids=[])
end

cannot :create, DispositionUpdateEvent do |ae|
!ae.transam_asset.disposable?(false)
!ae.transam_asset.try(:disposable?,false)
end


Expand Down
4 changes: 2 additions & 2 deletions app/models/abilities/manager_asset_event_ability.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def initialize(user)
end

cannot :create, DispositionUpdateEvent do |ae|
!ae.asset.disposable?(true)
!ae.asset.try(:disposable?,true)
end

cannot :create, EarlyDispositionRequestUpdateEvent do |ae|
Expand All @@ -30,7 +30,7 @@ def initialize(user)
end

cannot :create, DispositionUpdateEvent do |ae|
!ae.transam_asset.disposable?(true)
!ae.transam_asset.try(:disposable?,true)
end

cannot :create, EarlyDispositionRequestUpdateEvent do |ae|
Expand Down

0 comments on commit 84a0506

Please sign in to comment.