Module Cms::Behaviors::Userstamping::MacroMethods
In: lib/cms/behaviors/userstamping.rb

Methods

Included Modules

InstanceMethods

Public Instance methods

[Source]

    # File lib/cms/behaviors/userstamping.rb, line 11
11:         def is_userstamped(options={})
12:           @is_userstamped = true
13:           extend ClassMethods
14:           include InstanceMethods
15:         
16:           belongs_to :created_by, :class_name => "User"
17:           belongs_to :updated_by, :class_name => "User"
18:         
19:           before_save :set_userstamps
20:         
21:           named_scope :created_by, lambda{|user| {:conditions => {:created_by => user}}}        
22:           named_scope :updated_by, lambda{|user| {:conditions => {:updated_by => user}}}        
23:         end

[Source]

    # File lib/cms/behaviors/userstamping.rb, line 8
 8:         def userstamped?
 9:           !!@is_userstamped
10:         end

[Validate]