Created
December 19, 2008 20:33
Revisions
-
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ class User < ActiveRecord::Base # Paperclip @current_user.has_attached_file :photo, :styles => { :thumb=> "100x100#", :small => "150x150>", :medium => "300x300>", :large => "400x400>" } This is the method for where the user uploads the photo: def photoUpload @user = @current_user end And this is the view for uploading that photo: <%= error_messages_for :photo %> <% form_for(@user,:html => { :multipart => true }) do |f| %> <%= f.error_messages %> <p> <%= f.label 'Photo' %><br /> <%= f.file_field :photo %> </p> <p> <%= submit_tag 'Upload' %> </p> <% end -%>