I have a model called CustomizedBooking where I need to validate paid amount value equal to the price column of the database. Following is code snippet
validate :paid_amount_and_price
def paid_amount_and_price_check
if paid_amount == price column value of the database
errors.add(:paid_amount, "Must be equal to the price to process further!")
end
Please! somebody, suggest me