module Drafter::Draftable::ClassMethods
Overrides the draftable
method to define the draftable?
class method.
Public Class Methods
draftable?()
click to toggle source
# File lib/drafter/draftable.rb, line 18 def draftable? true end
Public Instance Methods
draftable(options={})
click to toggle source
Calls superclass method
# File lib/drafter/draftable.rb, line 8 def draftable(options={}) super(options) cattr_accessor :polymorphic_as self.polymorphic_as = options[:polymorphic_as] cattr_accessor :delegate_approval_to self.delegate_approval_to = options[:delegate_approval_to] class << self def draftable? true end end end
draftable?()
click to toggle source
For all ActiveRecord::Base models that do not call the draftable
method, the draftable?
method will return false.
# File lib/drafter/draftable.rb, line 26 def draftable? false end