I am trying to use the paperclip plugin to let users choose an avatar pic, upload and then store it. I cant seem to get this working.
I have generated the three fields:
add_column :users, :avatar_file_name, :string
add_column :users, :avatar_content_type, :string
add_column :users, :avatar_file_size, :integer
add_column :users, :avatar_updated_at, :datetime
I have added the following to my user model:
has_attached_file :avatar,
:styles => { :medium => "300x300>",
:thumb => "100x100>" }
and have added the input field to my user form:
<%= form.file_field :avatar %>
and my controller works fine for every other field, apart from this one so i dont think thats the problem.
Any ideas ?
(ps: i realize the code i uploaded are missing an _ but the < code > tag removes them.)