own and any instead of single and full for abilities

This commit is contained in:
Rafael Schouten
2014-10-02 13:11:19 +10:00
parent ce9b132ab5
commit 1e84e4fa85

View File

@@ -23,7 +23,7 @@ class AbilityDecorator
end
def can_manage_orders?(user)
( user.enterprises.map(&:type) & %w(single full) ).any?
( user.enterprises.map(&:sells) & %w(own any) ).any?
end
def can_manage_relationships?(user)