Skip to content

Instantly share code, notes, and snippets.

@ybakos
Created February 26, 2010 14:37
Show Gist options
  • Select an option

  • Save ybakos/315755 to your computer and use it in GitHub Desktop.

Select an option

Save ybakos/315755 to your computer and use it in GitHub Desktop.
class Photo < ActiveRecord::Base
belongs_to :photographable, :polymorphic => true
has_attached_file :source,
:styles => { :normal => ['112x112^', :png] },
:default_style => :normal,
:path => ":rails_root/public/assets/:class/:attachment/:id/:style/:basename.:extension",
:url => "/assets/:class/:attachment/:id/:style/:basename.:extension"
acts_as_list :scope => :photographable
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment