C:\> C:\InstantRails\mysql\bin\mysql -u root mysql> USE AddressBook_development mysql> ALTER TABLE `addressbook_development`.`contacts` ADD COLUMN `image` VARCHAR(255) NOT NULL DEFAULT '' AFTER `email`; mysql> exit C:\> exit
class Contact < ActiveRecord::Base file_column :image, :magick => { :versions => { :thumb => "64x48", :medium => "160x120" }} end
<p><label for="contact_image">Image</label><br/> <%= file_column_field 'contact', 'image' %></p>
<%= start_form_tag({:action => 'create'}, {:multipart => true}) %>
<%= start_form_tag({:action => 'update', :id => @contact}, {:multipart => true}) %>