I think that the path of least resistence would be to introduce a
model object for the relation if you need to doing validation and
other model-like behaviour.
On 11/13/05, www-data <www-data-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>
wrote:> Is it possible to perform validations on HABTM associations? That is,
> if I have a table like:
> person_id
> place_id
> comment
>
> I want to ''push_with_attributes'' and set the comment
field. Can I do a
> validation on the comment field such as validates_presence_of?
>
> Since the association doesn''t have a model, where does this
validation
> go?
>
> Jake
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
Cheers,
Peter Donald