safai 0.0.25 → 0.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/safai.rb +10 -0
  2. metadata +1 -1
data/lib/safai.rb CHANGED
@@ -1,5 +1,15 @@
1
1
  class Safai
2
2
 
3
+ def self._who_is(obj, cid)
4
+ if obj.id.blank?
5
+ obj.created_by = cid if obj.attributes.has_key?("created_by")
6
+ obj.updated_by = cid if obj.attributes.has_key?("updated_by")
7
+ else
8
+ obj.updated_by = cid if obj.attributes.has_key?("updated_by")
9
+ end
10
+ return obj
11
+ end
12
+
3
13
  #======================================
4
14
 
5
15
  module Helpers
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: safai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.25
4
+ version: 0.0.26
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: