Sha256: 139260fe28ea72492429b982624a2821a14e802ccb0242869abdae80ca3ff123

Contents?: true

Size: 482 Bytes

Versions: 1

Compression:

Stored size: 482 Bytes

Contents

module ActiveadminSelleoCms
  class Asset < ActiveRecord::Base
    attr_protected :id

    belongs_to :assetable, polymorphic: true

    has_attached_file :cover,
                      :url  => "/system/cms/covers/:id/:style_:basename.:extension",
                      :path => ":rails_root/public/system/cms/covers/:id/:style_:basename.:extension"

    validates_attachment_size :cover, :less_than => 10.megabytes

    def url(format=nil)
      data.url(format)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activeadmin-selleo-cms-0.0.20 app/models/activeadmin_selleo_cms/asset.rb