> So surely a Contract has many Conditions (and that relationship is
> polymorphic: DurationCondition, CreditCheckCondition, etc)?

Correct.

> And you
> can validate_associated conditions. That way each condition checks
> itself for validity. The contract shouldn't have anything to do with
> its conditions' validity - just pass the responsibility down to them.

Sure, but what about actually modeling the Conditions themselves? Use
STI? Have a #serialize and keep their columns dynamic? etc. They each
store very distinct kinds of information.

~ jf

>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to