Rails - Why is my custom validation being triggered for only a build command.
- by adam
I have a sentence and correction model with a has_one and belongs_to relationship respectively.
For some reason when I do
def create
@sentence = Sentence.find(params[:sentence_id])
@correction = @sentence.build_correction(params[:correction])
a custom validation I wrote for Correction is being called at the build_correction…