safai 0.0.25 → 0.0.26

Sign up to get free protection for your applications and to get access to all the features.
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: