erp_base_erp_svcs 3.1.3 → 3.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -29,19 +29,8 @@ class CompassAeInstance < ActiveRecord::Base
29
29
  end
30
30
 
31
31
  def setup_guid
32
- set_guid(Digest::SHA1.hexdigest(Time.now.to_s + rand(10000).to_s))
32
+ guid = Digest::SHA1.hexdigest(Time.now.to_s + rand(10000).to_s)
33
+ set_guid(guid)
34
+ guid
33
35
  end
34
-
35
- def is_active?
36
- self.type.nil? || self.current_status == 'deployed'
37
- end
38
-
39
- def activate
40
- self.current_status = 'deployed'
41
- end
42
-
43
- def deactivate
44
- self.current_status = 'undeployed'
45
- end
46
-
47
36
  end
@@ -40,6 +40,20 @@ class Party < ActiveRecord::Base
40
40
  end
41
41
  end
42
42
 
43
+ def has_role_type?(*passed_roles)
44
+ result = false
45
+ passed_roles.flatten!
46
+ passed_roles.each do |role|
47
+ role_iid = role.is_a?(RoleType) ? role.internal_identifier : role.to_s
48
+ self.role_types.each do |this_role|
49
+ result = true if (this_role.internal_identifier == role_iid)
50
+ break if result
51
+ end
52
+ break if result
53
+ end
54
+ result
55
+ end
56
+
43
57
  def has_phone_number?(phone_number)
44
58
  result = nil
45
59
  self.contacts.each do |c|
@@ -2,7 +2,7 @@ module ErpBaseErpSvcs
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 3
4
4
  MINOR = 1
5
- TINY = 3
5
+ TINY = 4
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erp_base_erp_svcs
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.3
4
+ version: 3.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-22 00:00:00.000000000 Z
12
+ date: 2013-06-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: attr_encrypted