Sha256: 958294544d397e0e9dc101a23f92299bbdb234294b9da0dfbfe91301b559a483

Contents?: true

Size: 586 Bytes

Versions: 25

Compression:

Stored size: 586 Bytes

Contents

module Optimacms

  class Mediafile < ActiveRecord::Base
    self.table_name = 'cms_mediafiles'

    has_attached_file :photo,
                      :styles => { :large=>'800x600>', :medium => "200x150#", :thumb => "150x112#" },
                      :default_url => "/icons/:style/noimage.png",
                      :path => ":rails_root/public/uploads/images/:basename_:style.:extension",
                      :url => "/uploads/images/:basename_:style.:extension"
    # /:class/:attachment
    validates_attachment_content_type :photo, :content_type => /\Aimage\/.*\Z/

  end

end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
optimacms-0.2.2 app/models/optimacms/mediafile.rb
optimacms-0.2.1 app/models/optimacms/mediafile.rb
optimacms-0.1.55 app/models/optimacms/mediafile.rb
optimacms-0.1.53 app/models/optimacms/mediafile.rb
optimacms-0.1.52 app/models/optimacms/mediafile.rb