Module: Cms::Behaviors::Userstamping::MacroMethods
- Defined in:
- lib/cms/behaviors/userstamping.rb
Instance Method Summary collapse
Instance Method Details
#is_userstamped(options = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/cms/behaviors/userstamping.rb', line 11 def is_userstamped(={}) @is_userstamped = true extend ClassMethods include InstanceMethods belongs_to :created_by, :class_name => "Cms::User" belongs_to :updated_by, :class_name => "Cms::User" before_save :set_userstamps scope :created_by, lambda{|user| {:conditions => {:created_by => user}}} scope :updated_by, lambda{|user| {:conditions => {:updated_by => user}}} end |
#userstamped? ⇒ Boolean
8 9 10 |
# File 'lib/cms/behaviors/userstamping.rb', line 8 def userstamped? !!@is_userstamped end |