I'm following along with Ryan Bates' carrierwave Railscast http://railscasts.com/episodes/253-carrierwave-file-uploads. At one point, after resizing the images into a thumbnail, he displays the thumbnail with the following code
<%= image_tag painting.image_url(:thumb).to_s %>
I'm calling the url method on the profilepic instance variable and trying to get the thumbnail like this
<%= image_tag @profilepic.url(:thumb).to_s %>
But I get the error
wrong number of arguments (1 for 0)
It's not expecting the :thumb parameter.
In the image_uploader, I arranged for the thumbnail to be created like this (after installing rmagick)
version :thumb do
process :resize_to_limit => [50, 50]
end
Can anyone explain what I might be doing wrong? I found an SO question on topic Rails: image_tag issue, which explains that the parameter (in this case :thumb) needs to be passed to the url method on the object (and not the object itself). That's what I'm doing, but I'm getting the error.