Sha256: 57c332d8b4e872526483aa39dad9d43fe1d960c77a0a07ff41be06e352f02319

Contents?: true

Size: 497 Bytes

Versions: 11

Compression:

Stored size: 497 Bytes

Contents

module Cms
  class ImageBlock < Cms::AbstractFileBlock

    acts_as_content_block :taggable => true
    has_attachment :file, :styles => {:thumb => "80x80"}
    validates_attachment_presence :file, :message => "You must upload a file"


    def self.display_name
      "Image"
    end

    def image
      file
    end

     # Override default behavior to handle STI class when looking up other versions of attachments.
    def attachable_type
      Cms::Attachment::FILE_BLOCKS
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
browsercms-3.5.7 app/models/cms/image_block.rb
browsercms-3.5.6 app/models/cms/image_block.rb
browsercms-3.5.5 app/models/cms/image_block.rb
browsercms-3.5.4 app/models/cms/image_block.rb
browsercms-3.5.3 app/models/cms/image_block.rb
browsercms-3.5.2 app/models/cms/image_block.rb
browsercms-3.5.1 app/models/cms/image_block.rb
browsercms-3.5.0 app/models/cms/image_block.rb
browsercms-3.5.0.rc3 app/models/cms/image_block.rb
browsercms-3.5.0.rc2 app/models/cms/image_block.rb
browsercms-3.5.0.rc1 app/models/cms/image_block.rb