Class: Spree::StockReservationAbility
- Inherits:
-
Object
- Object
- Spree::StockReservationAbility
- Includes:
- CanCan::Ability
- Defined in:
- app/models/spree/stock_reservation_ability.rb
Instance Method Summary collapse
-
#initialize(user) ⇒ StockReservationAbility
constructor
A new instance of StockReservationAbility.
Constructor Details
#initialize(user) ⇒ StockReservationAbility
Returns a new instance of StockReservationAbility.
5 6 7 8 9 |
# File 'app/models/spree/stock_reservation_ability.rb', line 5 def initialize(user) if user.has_spree_role?('admin') can :manage, Spree::ReservedStockItem end end |