public_activity 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,9 +13,10 @@ module PublicActivity
13
13
 
14
14
  # Module extending classes that serve as owners
15
15
  module ClassMethods
16
- # Adds has_many :activities association to model
16
+ # Adds ActiveRecord associations to model to simplify fetching
17
17
  # so you can list activities performed by the owner.
18
- # It is completely optional, but simplifies your work.
18
+ # It is completely optional. Any model can be an owner to an activity
19
+ # even without being an explicit activist.
19
20
  #
20
21
  # == Usage:
21
22
  # In model:
@@ -28,8 +29,8 @@ module PublicActivity
28
29
  # User.first.activities
29
30
  #
30
31
  def activist
31
- has_many :activities, :class_name => "PublicActivity::Activity", :as => :owner
32
- has_many :private_activities, :class_name => "PublicActivity::Activity", :as => :recipient
32
+ has_many :activities_as_owner, :class_name => "PublicActivity::Activity", :as => :owner
33
+ has_many :activities_as_recipient, :class_name => "PublicActivity::Activity", :as => :recipient
33
34
  end
34
35
  end
35
36
  end
@@ -1,4 +1,4 @@
1
1
  module PublicActivity
2
2
  # A constant with gem's version
3
- VERSION = '0.5.2'
3
+ VERSION = '0.5.3'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: public_activity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-12-22 00:00:00.000000000 Z
13
+ date: 2012-12-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord