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.1.61 app/models/optimacms/mediafile.rb
optimacms-0.4.3 app/models/optimacms/mediafile.rb
optimacms-0.4.2 app/models/optimacms/mediafile.rb
optimacms-0.3.9 app/models/optimacms/mediafile.rb
optimacms-0.3.8 app/models/optimacms/mediafile.rb
optimacms-0.3.7 app/models/optimacms/mediafile.rb
optimacms-0.3.6 app/models/optimacms/mediafile.rb
optimacms-0.3.5 app/models/optimacms/mediafile.rb
optimacms-0.3.2 app/models/optimacms/mediafile.rb
optimacms-0.3.1 app/models/optimacms/mediafile.rb
optimacms-0.2.23 app/models/optimacms/mediafile.rb
optimacms-0.2.22 app/models/optimacms/mediafile.rb
optimacms-0.2.19 app/models/optimacms/mediafile.rb
optimacms-0.2.18 app/models/optimacms/mediafile.rb
optimacms-0.2.17 app/models/optimacms/mediafile.rb
optimacms-0.2.8 app/models/optimacms/mediafile.rb
optimacms-0.2.7 app/models/optimacms/mediafile.rb
optimacms-0.2.6 app/models/optimacms/mediafile.rb
optimacms-0.2.5 app/models/optimacms/mediafile.rb
optimacms-0.1.60 app/models/optimacms/mediafile.rb