Imported from Lighthouse. Original ticket at: http://rails.lighthouseapp.com/projects/8994/tickets/6673
Created by Andriy Tyurnikov - 2011-04-05 10:41:54 UTC
class Poll < ActiveRecord::Base
accepts_nested_attributes_for :answers, :allow_destroy => true
class Answer < ActiveRecord::Base
validates_uniqueness_of :body, :scope => :poll_id
When new poll is created,
attributes for associated answers are passed,
but uniqueness of answers body in scope of poll is not validated.
Any ideas how to fix that.
Imported from Lighthouse.
Comment by Kane - 2011-04-05 23:38:33 UTC
can you supply a failing test case?