Re: DRY for ActiveRecord w/PostgreSQL : defaults and validations

Lugovoi Nikolai
Mon, 19 Sep 2005 14:29:08 -0000

Grant Johnson wrote:
> That said, would it make sense, when generating a model, to place any
> database constraints and relationships in the model?   not
> null=validates presense of, char(2)= validates length of, foriegn
> key=belongs to, etc.

well, i think it can be easily done w/o manually written additional code
in your model.

WBR, Lugovoi Nikolai