Topic: help with paperclip please!
Hi,
I'm trying to using paperclip to upload image attached to a user.
after my bundle install i have do :
rails generate paperclip user photowhich create migration and add 4 columns to my user table
in my user model i added
attr_accessible :name, :address, :city, :phone
has_attached_file :photo, styles => {:medium => "300x300>" }in my _form template
form_for @user, :html => { :multipart => true } do |f|
... form ...
<%= f.label 'photos' %>
<%= f.file_field :photo %>in my show template
<%= image_tag @user.photo.url(:medium) %>after i add a user, the show show me default image : missing.png
the path are /photos/medium/missing.png
i followed railscasts tutorial and nothing changed.
how with this method the photo will save in the database?
i'm a bit lost here. does i need to create a model called photo or a controller called photo? what i missed with the rails tutorial?
thanks a lots.