Subclass validations as well as superclass validations implemented. How to discard superclass validations in subclass?
My code:
class a < ActiveRecord::Base
validates_presence_of :price
end
class a2 < a
validates_presence_of :price
end
When I am creating a object for a2, using following command:
x = a2.new
x.save
the following errors are displayed:
x.errors.full_messages
=> ['price can't be blank','price can't be blank']
How can I resolve this, so that validations of superclass are ignored.