Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Paperclip resizing problems

I've got an avatar in the user model.

has_attached_file :avatar, :styles => {
    large: "800x800", medium: "300x200>", small: "260x180>", thumb: "80x80"
}

In the profile controller I use

<%= image_tag @user.avatar.url(:thumb) %>

and it works correctly with the dimensions specified.

I've tried to pass this information to my comments model and I can see the image.

<%= image_tag comment.user.avatar.url(:thumb) %>

But it's not adjusting the size of the avatar. I could use large or thumb and the size is staying the same. The only difference is that by using :thumb the picture gets a bit blurry.

Any ideas how to fix this?