activity_stream_client 0.0.12 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -39,12 +39,11 @@ module ActivityStream
39
39
 
40
40
  attr_accessor :cached_object
41
41
  def object
42
- if cached_object.present?
43
- cached_object
44
- elsif local?
42
+ if !cached_object.present? && local?
45
43
  klass = self.object_type.camelize.constantize
46
44
  self.cached_object = klass.find(object_id) if klass.exists?(object_id)
47
45
  end
46
+ cached_object
48
47
  end
49
48
 
50
49
  def local_deleted_object?
@@ -53,12 +52,11 @@ module ActivityStream
53
52
 
54
53
  attr_accessor :cached_target
55
54
  def target
56
- if cached_target.present?
57
- cached_target
58
- elsif local?
55
+ if !cached_target.present? && local?
59
56
  klass = target_type.camelize.constantize
60
- self.cached_target = klass.find(object_id) if klass.exists?(object_id)
57
+ self.cached_target = klass.find(target_id) if klass.exists?(target_id)
61
58
  end
59
+ cached_target
62
60
  end
63
61
 
64
62
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activity_stream_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.14
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-05-07 00:00:00.000000000 Z
12
+ date: 2013-07-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties