Sha256: dee6e7af404768fa47243a4e0edb92a4d25c3a15cf5cf6fb27581ca16195fd38

Contents?: true

Size: 428 Bytes

Versions: 11

Compression:

Stored size: 428 Bytes

Contents

module Cms
  class FileBlock < Cms::AbstractFileBlock

    acts_as_content_block :taggable => true

    has_attachment :file
    validates_attachment_presence :file, :message => "You must upload a file"

    def self.display_name
      "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/file_block.rb
browsercms-3.5.6 app/models/cms/file_block.rb
browsercms-3.5.5 app/models/cms/file_block.rb
browsercms-3.5.4 app/models/cms/file_block.rb
browsercms-3.5.3 app/models/cms/file_block.rb
browsercms-3.5.2 app/models/cms/file_block.rb
browsercms-3.5.1 app/models/cms/file_block.rb
browsercms-3.5.0 app/models/cms/file_block.rb
browsercms-3.5.0.rc3 app/models/cms/file_block.rb
browsercms-3.5.0.rc2 app/models/cms/file_block.rb
browsercms-3.5.0.rc1 app/models/cms/file_block.rb