app/controllers/users_controller.rb
1 2 3 4 5 6 7 8 9 10 11 12 |
# In your controller parse a "size" parameter end |
app/views/users/show.html.erb
1 2 3 4 5 6 7 |
# 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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# Hide your logic for getting the "other size" link in a helper method: end |

