Closed ivantjh closed 8 years ago
Generally speaking you can also make use of ActiveRecord Validations, which floats up errors if you use @match.save
or @match.update
. For example, given that you did it at the models:
@match = Match.find(:id)
@match.x = 'y' # update some wrong values
@match.save # returns false
@match.errors # outputs all the errors.
You can give it a go at rails console to try it out.
Duplicate player validation not working for latest commit. @moexmen/interns
@moexmen/interns