On Sep 27, 10:41 am, radhames brito <[email protected]> wrote:
> But does the image an imageable? how are you saving the image?

I was just talking about polymorphic in general. For images I'd use
something like paperclip.

http://github.com/thoughtbot/paperclip

Then you'd have something like

class Image < ActiveRecord::Base
  include Paperclip
  belongs_to :imageable, :polymorphic => true
  has_attached_file :photo,
    :styles => {
      :thumb=> "100x100",
      :small  => "200x200>",
      :medium => "300x300>",
      :large =>   "400x400>" }

end

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to