Lock in of database, so there is no way to assing more offsprings than the available space
Opened this issue · 2 comments
katafira commented
PR #8 Covers this TODO with the following method (/models/shift.rb):
def sites_available_gt_0
return true if sites_available? && sites_available >= 0
errors.add(:shift, I18n.t("sites_available_under_0", scope: SCOPE))
false
end
Is this ok?
@sergio-ocon @alexvkcr @delaluzparra
chargio commented
Yes
chargio commented
Altough as you have a shift element you are testing against, you should use
shift.errors.add