Tuesday, August 2, 2011

Re: [Rails] image path save in mysql database

Look closely at the Creating Complex Forms Railscast (2 parter). While
that covers making a quiz, you can follow the same logic to create a
way to upload multiple images to a single parent object (using
accepts_nested_attributes_for) so there's no limit to the number of
images each object can have. The key here is that you need a separate
model to hold the images, and then you need to set up a has_many/
belongs_to relationship between your parent model and the image model.
That way you can have 0 .. N images in each parent object.

Walter

On Aug 2, 2011, at 10:15 AM, john paul wrote:

> Hi
>
> Already i used for paper-clip plugins and i need in file
> upload add multiple images and store database , if i retrieve images
> from database all images display in singal page ,
>
>
> Regards,
> John Paul.D
>
> --
> 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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate