streamit 0.0.6.1 → 0.0.6.2
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.
- data/README.rdoc +39 -29
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -2,33 +2,43 @@
|
|
2
2
|
|
3
3
|
Provides feed stream like feature to rails apps
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
5
|
+
stream.rb
|
6
|
+
|
7
|
+
class Stream
|
8
|
+
include MongoMapper::Document
|
9
|
+
include Streamit::ORM::MongoMapper
|
10
|
+
end
|
11
|
+
|
12
|
+
"he9lin started watching auction ipad a minute ago"
|
13
|
+
|
14
|
+
en.yml
|
15
|
+
|
16
|
+
en:
|
17
|
+
streamit:
|
18
|
+
watching:
|
19
|
+
create: "started watching"
|
20
|
+
|
21
|
+
watching.rb
|
22
|
+
|
23
|
+
class Watching < ActiveRecord::Base
|
24
|
+
belongs_to :watcher, :class_name => "User", :foreign_key => "user_id"
|
25
|
+
belongs_to :watched_item, :class_name => "Item", :foreign_key => "item_id"
|
20
26
|
|
21
|
-
|
22
|
-
|
23
|
-
end
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
27
|
+
stream :create, :actor => :watcher,
|
28
|
+
:receiver => :watched_item
|
29
|
+
end
|
30
|
+
|
31
|
+
"he9lin edited profile image just now"
|
32
|
+
|
33
|
+
en.yml
|
34
|
+
|
35
|
+
en:
|
36
|
+
users:
|
37
|
+
update:
|
38
|
+
image_url: "edited profile image"
|
39
|
+
|
40
|
+
user.rb
|
41
|
+
|
42
|
+
class User < ActiveRecord::Base
|
43
|
+
stream :update, :attributes => :image_url
|
44
|
+
end
|