I have two models
class Person
embeds_one :address
end
class Address
embedded_in :person
field :city
validates :city, :presence => true
end
Now when I do
person.address = Address.new
the validation of address is called. But I don't need the validation in my case and neither can I remove :validates
from Address (because I need it later on). I want to do something like (:validate => false)
. If anybody got idea, let me know! I am using mongoid-2.0.0.