1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-18 07:52:23 +01:00

fix SubscriptionGroupValidator

This commit is contained in:
Sylvain 2019-06-05 07:52:02 +02:00
parent 4c033614ae
commit 9fd6ea08b9

View File

@ -1,6 +1,6 @@
class SubscriptionGroupValidator < ActiveModel::Validator
def validate(record)
return if record.statistic_profile.group_id == record.plan.group
return if record.statistic_profile.group_id == record.plan.group_id
record.errors[:plan_id] << "This plan is not compatible with the current user's group"
end