I would think it is much simpler...

Be sure you have ImageMagick installed (or an alternative)
Be sure your migration defined the logo_file_name, logo_content_type, 
logo_file_size in the jobs table.

My example:

class Stage < ActiveRecord::Base
  # cycling race stage
  # belongs to a race-year, like 2010 - Vuelta d'Espana
  # has many stage standings (rider finish order)
  # has attached images for the route
  #   map and the elevation profile
  belongs_to :raceyear
  has_many :stagestandings

  has_attached_file :map, :styles => {:thumb => '100x100>'}
  has_attached_file :profile, :styles => {:thumb => '100x100>'}
end

<%= form_for @stage, :html => {:multipart => true} do |f| %>

blah blah blah, fields to select raceyear, enter the stage name,
description, terrain and distance, relevant image upload fields
below
<p>
<%= f.label :map %>
<%= f.file_field :map %>
</p><p>
<%= f.label :profile %>
<%= f.file_field :profile %>
</p>
<%= f.submit %>
<% end %>

Paperclip does all the heavy lifting.
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to