This is entirely possible using a before_create, or creating the associated
object along with the original object and using validates_associated
:associated_objects
On Jan 25, 2008 10:30 AM, Fox Ph
<rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:
>
> hi all,
> is it possible for a model to create an object (of which it has many),
> when it is first created?
> i''m trying to have something like
>
> Image -hm-> ImageThumbs
> where the first ImageThumb is created when the Image object is saved,
> and any validation errors from ImageThumb.validation are passed back to
> the original object/page template.
>
> any thoughts on this?
> thanks for reading.
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>
--
Ryan Bigg
http://www.frozenplague.net
Feel free to add me to MSN and/or GTalk as this email.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---