Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Scoped uniqueness validation of associated objects #999
Imported from Lighthouse. Original ticket at: http://rails.lighthouseapp.com/projects/8994/tickets/6673
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,
Any ideas how to fix that.