decko-commons/decko

View on GitHub
mod/account/set/all/account.rb

Summary

Maintainability
A
0 mins
Test Coverage
module ClassMethods
  def default_accounted_type_id
    UserID
  end
end

def account
  nil
end

def account?
  false
end

event :generate_token do
  Digest::SHA1.hexdigest "--#{Time.zone.now.to_f}--#{rand 10}--"
end

event :set_stamper, :prepare_to_validate do
  self.updater_id = Auth.current_id
  self.creator_id = updater_id if new_card?
end