Sha256: 043f464398bf4993424e03846a09e83bdd5cc6b98ac328355fe5fd0f665cf19c

Contents?: true

Size: 603 Bytes

Versions: 58

Compression:

Stored size: 603 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

58 entries across 58 versions & 1 rubygems

Version Path
optimacms-0.3.35 app/models/optimacms/mediafile.rb
optimacms-0.3.34 app/models/optimacms/mediafile.rb
optimacms-0.3.30 app/models/optimacms/mediafile.rb
optimacms-0.3.29 app/models/optimacms/mediafile.rb
optimacms-0.3.23 app/models/optimacms/mediafile.rb
optimacms-0.3.15 app/models/optimacms/mediafile.rb
optimacms-0.3.12 app/models/optimacms/mediafile.rb
optimacms-0.3.11 app/models/optimacms/mediafile.rb
optimacms-0.2.26 app/models/optimacms/mediafile.rb
optimacms-0.2.25 app/models/optimacms/mediafile.rb
optimacms-0.2.24 app/models/optimacms/mediafile.rb
optimacms-0.3.4 app/models/optimacms/mediafile.rb
optimacms-0.3.3 app/models/optimacms/mediafile.rb
optimacms-0.2.21 app/models/optimacms/mediafile.rb
optimacms-0.2.20 app/models/optimacms/mediafile.rb
optimacms-0.2.16 app/models/optimacms/mediafile.rb
optimacms-0.2.15 app/models/optimacms/mediafile.rb
optimacms-0.2.14 app/models/optimacms/mediafile.rb
optimacms-0.2.13 app/models/optimacms/mediafile.rb
optimacms-0.2.12 app/models/optimacms/mediafile.rb