Class: Safai

Inherits:
Object
  • Object
show all
Defined in:
lib/safai.rb

Defined Under Namespace

Modules: DeviseHelpers, Helpers Classes: Address, Clean, Date, Gravatar, Money, Regex, Spreadsheet

Class Method Summary collapse

Class Method Details

._who_is(obj, cid) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/safai.rb', line 3

def self._who_is(obj, cid)
  if obj.id.blank?
    obj.created_by = cid if obj.attributes.has_key?("created_by")
    obj.updated_by = cid if obj.attributes.has_key?("updated_by")
  else
    obj.updated_by = cid if obj.attributes.has_key?("updated_by")
  end
  return obj
end