Sha256: f456c9667edd4f8c7fcce1f1752cb56f5b7ac870bde917bf9d586a1ab63674da

Contents?: true

Size: 682 Bytes

Versions: 7

Compression:

Stored size: 682 Bytes

Contents

module EtabliocmsPages
  class Attachment < ActiveRecord::Base

    belongs_to :attachable, :polymorphic => true

    has_attached_file :data,
                      :path => ":rails_root/public/system/:class/:attachment/:id/:style/:filename",
                      :url => "/system/:class/:attachment/:id/:style/:filename",
                      :styles => {
                        :large => EtabliocmsPages.try(:paperclip_large) || "800x800>",
                        :medium => EtabliocmsPages.try(:paperclip_medium) || "400x400>",
                        :thumbnail => EtabliocmsPages.try(:paperclip_thumbnail) || "100x100>"}

    validates_attachment_presence :data

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
etabliocms_pages-0.0.10 app/models/etabliocms_pages/attachment.rb
etabliocms_pages-0.0.9 app/models/etabliocms_pages/attachment.rb
etabliocms_pages-0.0.8 app/models/etabliocms_pages/attachment.rb
etabliocms_pages-0.0.7 app/models/etabliocms_pages/attachment.rb
etabliocms_pages-0.0.6 app/models/etabliocms_pages/attachment.rb
etabliocms_pages-0.0.5 app/models/etabliocms_pages/attachment.rb
etabliocms_pages-0.0.4 app/models/etabliocms_pages/attachment.rb