Module: Cms::Behaviors::Hiding::MacroMethods

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

Instance Method Summary collapse

Instance Method Details

#hideable?Boolean

Returns:

  • (Boolean)

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

def hideable?
  !!@is_hideable
end

#is_hideable(options = {}) ⇒ Object


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

def is_hideable(options={})
  @is_hideable = true
  extend ClassMethods
  include InstanceMethods

  scope :hidden, :conditions => {:hidden => true}
  scope :not_hidden, :conditions => {:hidden => false}        
end