Module: Cms::Behaviors::Attaching
- Defined in:
- lib/cms/behaviors/attaching.rb
Overview
Allows one or more files to be attached to content blocks.
class Book < ActiveRecord::Base acts_as_content_block has_attachment :cover end
To add a set of multiple attachments:
class Book acts_as_content_block
:cover
:drafts
end
Adds the following methods to Book:
- Book#cover @return [Cms::Attachment]
- Book#drafts @return [ArrayCms::Attachment]
Defined Under Namespace
Modules: ClassMethods, InstanceMethods, MacroMethods, Validations