Module: Cms::Behaviors::Archiving::MacroMethods

Defined in:
lib/cms/behaviors/archiving.rb

Instance Method Summary collapse

Instance Method Details

#archivable?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/cms/behaviors/archiving.rb', line 8

def archivable?
  !!@is_archivable
end

#is_archivable(options = {}) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/cms/behaviors/archiving.rb', line 11

def is_archivable(options={})
  @is_archivable = true
  include InstanceMethods

  named_scope :archived, :conditions => {:archived => true}
  named_scope :not_archived, :conditions => {:archived => false}        
end