Welcome to Working With Rails


Discussion Forums

Discuss all things Ruby on Rails with perhaps the web's most vibrant group of Ruby on Rails enthusiasts.
attachment_fu display image
5 Posts
attachment_fu display image

Hi all

I am using attachment_fu plugin to upload images and filesystem to store images. Saving id of the image in db.

Can't able to retrieve the images using the id..

Can any one tell the solution..

can't you paste your controllers method and views? so me or other rubyist can help you

Sign In To Rate Post

It depends on how your have set up the model and controller, here is an example:

in the controller:

@image = Image.find(params[:id])

in the view:

Mike Clark has written a very good tutorial for using attachment_fu http://clarkware.com/cgi/blosxom/2007/02/24

If they didn't help, try to put more details here so we could help you further.

and you should always check the basics, i had seen people forget to pass the id parameter :) just in case. and mike clark's guide is excellent, but if i were you, i would take a look over the paperclip plugin

A little note, when you use the image_tag make sure that the url to the image is correct.

5 Posts
Login to add your message