I have two linked models (simplified) :
Ad :
class Ad < ActiveRecord::Base
has_many :propositions
validates :pricemin
validates :pricemax
...
Proposition :
class Proposition < ActiveRecord::Base
belongs_to :ad
attr_accessible :price_proposition
...
I'm trying to add a restriction for the price_proposition (in "proposition" model) to be between "pricemin" and "pricemax".
How could I do that ?
Thanks for your help