[Rails] Re: returning image in my search results
Hello... +1 for paperclip or attachment_fu; they will make this a lot
easier for you.
Earlier this year I wrote a detailed tutorial on how to setup and use
Paperclip in a new Rails application. Coincidentally, my example was
to attach photos to users and then to show different size photos. At
the bottom, I explain how to display a thumbnail for each user in a
table, similar to what you're trying to do.
See: http://patshaughnessy.net/2009/4/30/paperclip-sample-app
- pat
On Dec 3, 8:41 am, Leonardo Mateo <leonardoma...@gmail.com> wrote:
> On Thu, Dec 3, 2009 at 5:56 AM, RubyonRails_newbie<craigwest...@googlemail.com> wrote:
> > hi,
>
> > Thanks for the replies...
>
> > I tried user.friends, and nothing happened. Well, i didn't get an
> > image anyway.
>
> > How would i need to combine the user.friends line witht he actual path
> > to the image: <%= link_to thumbnail_tag(friend), profile_for(friend)
> > %>?
>
> Well... that depends on what are you using those files, I would
> strongly recommend using paperclip or attachment_fu.
> If you're uploading/handling your files by hand, you should be the one
> who knows where your files are stored and you'll be responsible for
> building the image path.
>
> --
> Leonardo Mateo.
> There's no place like ~
--
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