Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock in of database, so there is no way to assing more offsprings than the available space #25

Open
katafira opened this issue Aug 10, 2016 · 2 comments

Comments

@katafira
Copy link
Collaborator

katafira commented Aug 10, 2016

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
Copy link
Member

chargio commented Aug 10, 2016

Yes

@chargio
Copy link
Member

chargio commented Aug 10, 2016

Altough as you have a shift element you are testing against, you should use
shift.errors.add

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants