# In your controller parse a "size" parameterclassUsersController < ApplicationControllerdefshow@user=User.find(params[:id])
@size= params[:size] =='original'?'original' : 'small'respond_todo |format|
format.html # show.html.erb
format.xml {render:xml => @user }
endendend
app/views/users/show.html.erb
# In your view, display the appropriate size, and a link somewhere to the other size.# You need "to_sym" since Paperclip expects a symbol... :original, not 'original'<p><b>Avatar:</b><%= image_tag @user.avatar.url(@size.to_sym) %><br></p><%= link_to_other_size(@size) %>
app/helpers/users_helper.rb
# Hide your logic for getting the "other size" link in a helper method:moduleUsersHelperdeflink_to_other_size(size)case size
when'small'
other_size ='original'else
other_size ='small'endlink_to link_name_for_size(other_size), :size => other_size
enddeflink_name_for_size(size)"#{size.capitalize} Size"endend