Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Asset < ActiveRecord::Base
- ... attachment_fu logic ...
- end
- class Avatar < Asset
- ... avatar specific attachment_fu logic ...
- end
- class PDF < Asset
- ... PDF specific attachment_fu logic ...
- end
- class FileUpload < ActiveRecord::Base
- belongs_to :fileable, :polymorphic => true
- file_column :name
- end
- class Company < ActiveRecord::Base
- has_many :file_uploads, :as => :fileable
- end
Add Comment
Please, Sign In to add comment