Module: Cmsable::ClassMethods

Defined in:
lib/cmsable.rb

Overview

Add cmsable method to ActiveRecord classes

Instance Method Summary collapse

Instance Method Details

#cmsable(options = {}) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/cmsable.rb', line 9

def cmsable(options = {})
  cattr_accessor :cmsable_body

  options = {
    body: :body
  }.merge options

  self.cmsable_body = options[:body]
end