is_contacted 0.1.0 → 0.1.1

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/is_contacted.rb +5 -0
  2. metadata +3 -3
data/lib/is_contacted.rb CHANGED
@@ -37,6 +37,11 @@ module IsContacted
37
37
  self.contact_id = _new_contact.id
38
38
  end
39
39
  end
40
+ if contact_id.blank? && self.respond_to?(:user_id)
41
+ user = User.find_by_user_id(self.user_id)
42
+ contact = Contact.find_by_value(user.login) if user
43
+ self.contact_id = contact.id if contact
44
+ end
40
45
  end
41
46
  end
42
47
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 0
9
- version: 0.1.0
8
+ - 1
9
+ version: 0.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Dieinzige
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-03-10 00:00:00 +03:00
17
+ date: 2010-03-12 00:00:00 +03:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency