muck-activities 0.1.12 → 0.1.13
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/.gitignore +5 -0
- data/README.rdoc +21 -0
- data/Rakefile +26 -10
- data/VERSION +1 -1
- data/app/views/activities/_template_filter.html.erb +1 -1
- data/locales/ar.yml +3 -0
- data/locales/bg.yml +3 -0
- data/locales/ca.yml +3 -0
- data/locales/cs.yml +4 -1
- data/locales/da.yml +4 -1
- data/locales/de.yml +3 -0
- data/locales/el.yml +3 -0
- data/locales/en.yml +4 -1
- data/locales/es.yml +3 -0
- data/locales/et.yml +31 -0
- data/locales/fa.yml +31 -0
- data/locales/fi.yml +31 -0
- data/locales/fr.yml +3 -0
- data/locales/gl.yml +31 -0
- data/locales/hi.yml +31 -0
- data/locales/hr.yml +31 -0
- data/locales/hu.yml +31 -0
- data/locales/id.yml +31 -0
- data/locales/it.yml +3 -0
- data/locales/iw.yml +3 -0
- data/locales/ja.yml +3 -0
- data/locales/ko.yml +3 -0
- data/locales/lt.yml +3 -0
- data/locales/lv.yml +3 -0
- data/locales/mt.yml +31 -0
- data/locales/nl.yml +3 -0
- data/locales/no.yml +3 -0
- data/locales/pl.yml +3 -0
- data/locales/pt-PT.yml +31 -0
- data/locales/ro.yml +3 -0
- data/locales/ru.yml +3 -0
- data/locales/sk.yml +4 -1
- data/locales/sl.yml +3 -0
- data/locales/sq.yml +31 -0
- data/locales/sr.yml +3 -0
- data/locales/sv.yml +3 -0
- data/locales/th.yml +31 -0
- data/locales/tl.yml +3 -0
- data/locales/tr.yml +31 -0
- data/locales/uk.yml +3 -0
- data/locales/vi.yml +3 -0
- data/locales/zh-CN.yml +3 -0
- data/locales/zh-TW.yml +3 -0
- data/locales/zh.yml +3 -0
- data/muck-activities.gemspec +17 -81
- data/test/rails_root/app/models/user.rb +0 -7
- metadata +16 -23
- data/pkg/muck-activities-0.1.10.gem +0 -0
- data/pkg/muck-activities-0.1.11.gem +0 -0
- data/rdoc/classes/ActionController/Routing/RouteSet.html +0 -148
- data/rdoc/classes/ActionController/Routing.html +0 -107
- data/rdoc/classes/ActionController.html +0 -107
- data/rdoc/classes/MuckActivities/Tasks.html +0 -146
- data/rdoc/classes/MuckActivities.html +0 -111
- data/rdoc/classes/MuckActivity/ActMethods.html +0 -260
- data/rdoc/classes/MuckActivity/InstanceMethods.html +0 -376
- data/rdoc/created.rid +0 -1
- data/rdoc/files/README_rdoc.html +0 -204
- data/rdoc/files/lib/muck_activities/active_record/acts/muck_activity_rb.html +0 -101
- data/rdoc/files/lib/muck_activities/initialize_routes_rb.html +0 -101
- data/rdoc/files/lib/muck_activities/muck_activity_rb.html +0 -101
- data/rdoc/files/lib/muck_activities/tasks_rb.html +0 -110
- data/rdoc/files/lib/muck_activities_rb.html +0 -110
- data/rdoc/fr_class_index.html +0 -33
- data/rdoc/fr_file_index.html +0 -32
- data/rdoc/fr_method_index.html +0 -38
- data/rdoc/index.html +0 -24
- data/rdoc/rdoc-style.css +0 -208
@@ -1,260 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Module: MuckActivity::ActMethods</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Module</strong></td>
|
53
|
-
<td class="class-name-in-header">MuckActivity::ActMethods</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/muck_activities/active_record/acts/muck_activity_rb.html">
|
59
|
-
lib/muck_activities/active_record/acts/muck_activity.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
<a href="../../files/lib/muck_activities/muck_activity_rb.html">
|
63
|
-
lib/muck_activities/muck_activity.rb
|
64
|
-
</a>
|
65
|
-
<br />
|
66
|
-
</td>
|
67
|
-
</tr>
|
68
|
-
|
69
|
-
</table>
|
70
|
-
</div>
|
71
|
-
<!-- banner header -->
|
72
|
-
|
73
|
-
<div id="bodyContent">
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
<div id="contextContent">
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
</div>
|
82
|
-
|
83
|
-
<div id="method-list">
|
84
|
-
<h3 class="section-bar">Methods</h3>
|
85
|
-
|
86
|
-
<div class="name-list">
|
87
|
-
<a href="#M000006">acts_as_activity_source</a>
|
88
|
-
<a href="#M000004">acts_as_activity_source</a>
|
89
|
-
<a href="#M000005">has_activities</a>
|
90
|
-
<a href="#M000003">has_activities</a>
|
91
|
-
</div>
|
92
|
-
</div>
|
93
|
-
|
94
|
-
</div>
|
95
|
-
|
96
|
-
|
97
|
-
<!-- if includes -->
|
98
|
-
<div id="includes">
|
99
|
-
<h3 class="section-bar">Included Modules</h3>
|
100
|
-
|
101
|
-
<div id="includes-list">
|
102
|
-
<span class="include-name"><a href="InstanceMethods.html">InstanceMethods</a></span>
|
103
|
-
<span class="include-name"><a href="InstanceMethods.html">InstanceMethods</a></span>
|
104
|
-
<span class="include-name"><a href="InstanceMethods.html">InstanceMethods</a></span>
|
105
|
-
<span class="include-name"><a href="InstanceMethods.html">InstanceMethods</a></span>
|
106
|
-
</div>
|
107
|
-
</div>
|
108
|
-
|
109
|
-
<div id="section">
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
<!-- if method_list -->
|
119
|
-
<div id="methods">
|
120
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
121
|
-
|
122
|
-
<div id="method-M000006" class="method-detail">
|
123
|
-
<a name="M000006"></a>
|
124
|
-
|
125
|
-
<div class="method-heading">
|
126
|
-
<a href="#M000006" class="method-signature">
|
127
|
-
<span class="method-name">acts_as_activity_source</span><span class="method-args">()</span>
|
128
|
-
</a>
|
129
|
-
</div>
|
130
|
-
|
131
|
-
<div class="method-description">
|
132
|
-
<p>
|
133
|
-
<tt><a href="ActMethods.html#M000004">acts_as_activity_source</a></tt>
|
134
|
-
gives the class it is called on a method called <tt>add_activity</tt> that
|
135
|
-
can add activities into a feed.
|
136
|
-
</p>
|
137
|
-
<p><a class="source-toggle" href="#"
|
138
|
-
onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
|
139
|
-
<div class="method-source-code" id="M000006-source">
|
140
|
-
<pre>
|
141
|
-
<span class="ruby-comment cmt"># File lib/muck_activities/muck_activity.rb, line 22</span>
|
142
|
-
22: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">acts_as_activity_source</span>
|
143
|
-
23: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">included_modules</span>.<span class="ruby-identifier">include?</span> <span class="ruby-constant">InstanceMethods</span>
|
144
|
-
24: <span class="ruby-identifier">include</span> <span class="ruby-constant">InstanceMethods</span>
|
145
|
-
25: <span class="ruby-keyword kw">end</span>
|
146
|
-
26: <span class="ruby-keyword kw">end</span>
|
147
|
-
</pre>
|
148
|
-
</div>
|
149
|
-
</div>
|
150
|
-
</div>
|
151
|
-
|
152
|
-
<div id="method-M000004" class="method-detail">
|
153
|
-
<a name="M000004"></a>
|
154
|
-
|
155
|
-
<div class="method-heading">
|
156
|
-
<a href="#M000004" class="method-signature">
|
157
|
-
<span class="method-name">acts_as_activity_source</span><span class="method-args">()</span>
|
158
|
-
</a>
|
159
|
-
</div>
|
160
|
-
|
161
|
-
<div class="method-description">
|
162
|
-
<p>
|
163
|
-
<tt><a href="ActMethods.html#M000004">acts_as_activity_source</a></tt>
|
164
|
-
gives the class it is called on a method called <tt>add_activity</tt> that
|
165
|
-
can add activities into a feed.
|
166
|
-
</p>
|
167
|
-
<p><a class="source-toggle" href="#"
|
168
|
-
onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
|
169
|
-
<div class="method-source-code" id="M000004-source">
|
170
|
-
<pre>
|
171
|
-
<span class="ruby-comment cmt"># File lib/muck_activities/active_record/acts/muck_activity.rb, line 22</span>
|
172
|
-
22: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">acts_as_activity_source</span>
|
173
|
-
23: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">included_modules</span>.<span class="ruby-identifier">include?</span> <span class="ruby-constant">InstanceMethods</span>
|
174
|
-
24: <span class="ruby-identifier">include</span> <span class="ruby-constant">InstanceMethods</span>
|
175
|
-
25: <span class="ruby-keyword kw">end</span>
|
176
|
-
26: <span class="ruby-keyword kw">end</span>
|
177
|
-
</pre>
|
178
|
-
</div>
|
179
|
-
</div>
|
180
|
-
</div>
|
181
|
-
|
182
|
-
<div id="method-M000005" class="method-detail">
|
183
|
-
<a name="M000005"></a>
|
184
|
-
|
185
|
-
<div class="method-heading">
|
186
|
-
<a href="#M000005" class="method-signature">
|
187
|
-
<span class="method-name">has_activities</span><span class="method-args">()</span>
|
188
|
-
</a>
|
189
|
-
</div>
|
190
|
-
|
191
|
-
<div class="method-description">
|
192
|
-
<p>
|
193
|
-
<tt><a href="ActMethods.html#M000003">has_activities</a></tt> gives the
|
194
|
-
class it is called on an activity feed and a method called
|
195
|
-
<tt>add_activity</tt> that can add activities into a feed. Retrieve
|
196
|
-
activity feed items via object.activities. ie @user.activities.
|
197
|
-
</p>
|
198
|
-
<p><a class="source-toggle" href="#"
|
199
|
-
onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
|
200
|
-
<div class="method-source-code" id="M000005-source">
|
201
|
-
<pre>
|
202
|
-
<span class="ruby-comment cmt"># File lib/muck_activities/muck_activity.rb, line 12</span>
|
203
|
-
12: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">has_activities</span>
|
204
|
-
13: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">included_modules</span>.<span class="ruby-identifier">include?</span> <span class="ruby-constant">InstanceMethods</span>
|
205
|
-
14: <span class="ruby-identifier">has_many</span> <span class="ruby-identifier">:activity_feeds</span>, <span class="ruby-identifier">:as</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:ownable</span>
|
206
|
-
15: <span class="ruby-identifier">has_many</span> <span class="ruby-identifier">:activities</span>, <span class="ruby-identifier">:through</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:activity_feeds</span>, <span class="ruby-identifier">:order</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'created_at desc'</span>
|
207
|
-
16: <span class="ruby-identifier">include</span> <span class="ruby-constant">InstanceMethods</span>
|
208
|
-
17: <span class="ruby-keyword kw">end</span>
|
209
|
-
18: <span class="ruby-keyword kw">end</span>
|
210
|
-
</pre>
|
211
|
-
</div>
|
212
|
-
</div>
|
213
|
-
</div>
|
214
|
-
|
215
|
-
<div id="method-M000003" class="method-detail">
|
216
|
-
<a name="M000003"></a>
|
217
|
-
|
218
|
-
<div class="method-heading">
|
219
|
-
<a href="#M000003" class="method-signature">
|
220
|
-
<span class="method-name">has_activities</span><span class="method-args">()</span>
|
221
|
-
</a>
|
222
|
-
</div>
|
223
|
-
|
224
|
-
<div class="method-description">
|
225
|
-
<p>
|
226
|
-
<tt><a href="ActMethods.html#M000003">has_activities</a></tt> gives the
|
227
|
-
class it is called on an activity feed and a method called
|
228
|
-
<tt>add_activity</tt> that can add activities into a feed. Retrieve
|
229
|
-
activity feed items via object.activities. ie @user.activities.
|
230
|
-
</p>
|
231
|
-
<p><a class="source-toggle" href="#"
|
232
|
-
onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
|
233
|
-
<div class="method-source-code" id="M000003-source">
|
234
|
-
<pre>
|
235
|
-
<span class="ruby-comment cmt"># File lib/muck_activities/active_record/acts/muck_activity.rb, line 12</span>
|
236
|
-
12: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">has_activities</span>
|
237
|
-
13: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">included_modules</span>.<span class="ruby-identifier">include?</span> <span class="ruby-constant">InstanceMethods</span>
|
238
|
-
14: <span class="ruby-identifier">has_many</span> <span class="ruby-identifier">:activity_feeds</span>, <span class="ruby-identifier">:as</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:ownable</span>
|
239
|
-
15: <span class="ruby-identifier">has_many</span> <span class="ruby-identifier">:activities</span>, <span class="ruby-identifier">:through</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:activity_feeds</span>, <span class="ruby-identifier">:order</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'created_at desc'</span>
|
240
|
-
16: <span class="ruby-identifier">include</span> <span class="ruby-constant">InstanceMethods</span>
|
241
|
-
17: <span class="ruby-keyword kw">end</span>
|
242
|
-
18: <span class="ruby-keyword kw">end</span>
|
243
|
-
</pre>
|
244
|
-
</div>
|
245
|
-
</div>
|
246
|
-
</div>
|
247
|
-
|
248
|
-
|
249
|
-
</div>
|
250
|
-
|
251
|
-
|
252
|
-
</div>
|
253
|
-
|
254
|
-
|
255
|
-
<div id="validator-badges">
|
256
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
257
|
-
</div>
|
258
|
-
|
259
|
-
</body>
|
260
|
-
</html>
|
@@ -1,376 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
-
<!DOCTYPE html
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
6
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
-
<head>
|
8
|
-
<title>Module: MuckActivity::InstanceMethods</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
-
<script type="text/javascript">
|
13
|
-
// <![CDATA[
|
14
|
-
|
15
|
-
function popupCode( url ) {
|
16
|
-
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
-
}
|
18
|
-
|
19
|
-
function toggleCode( id ) {
|
20
|
-
if ( document.getElementById )
|
21
|
-
elem = document.getElementById( id );
|
22
|
-
else if ( document.all )
|
23
|
-
elem = eval( "document.all." + id );
|
24
|
-
else
|
25
|
-
return false;
|
26
|
-
|
27
|
-
elemStyle = elem.style;
|
28
|
-
|
29
|
-
if ( elemStyle.display != "block" ) {
|
30
|
-
elemStyle.display = "block"
|
31
|
-
} else {
|
32
|
-
elemStyle.display = "none"
|
33
|
-
}
|
34
|
-
|
35
|
-
return true;
|
36
|
-
}
|
37
|
-
|
38
|
-
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
-
|
41
|
-
// ]]>
|
42
|
-
</script>
|
43
|
-
|
44
|
-
</head>
|
45
|
-
<body>
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
<div id="classHeader">
|
50
|
-
<table class="header-table">
|
51
|
-
<tr class="top-aligned-row">
|
52
|
-
<td><strong>Module</strong></td>
|
53
|
-
<td class="class-name-in-header">MuckActivity::InstanceMethods</td>
|
54
|
-
</tr>
|
55
|
-
<tr class="top-aligned-row">
|
56
|
-
<td><strong>In:</strong></td>
|
57
|
-
<td>
|
58
|
-
<a href="../../files/lib/muck_activities/active_record/acts/muck_activity_rb.html">
|
59
|
-
lib/muck_activities/active_record/acts/muck_activity.rb
|
60
|
-
</a>
|
61
|
-
<br />
|
62
|
-
<a href="../../files/lib/muck_activities/muck_activity_rb.html">
|
63
|
-
lib/muck_activities/muck_activity.rb
|
64
|
-
</a>
|
65
|
-
<br />
|
66
|
-
</td>
|
67
|
-
</tr>
|
68
|
-
|
69
|
-
</table>
|
70
|
-
</div>
|
71
|
-
<!-- banner header -->
|
72
|
-
|
73
|
-
<div id="bodyContent">
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
<div id="contextContent">
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
</div>
|
82
|
-
|
83
|
-
<div id="method-list">
|
84
|
-
<h3 class="section-bar">Methods</h3>
|
85
|
-
|
86
|
-
<div class="name-list">
|
87
|
-
<a href="#M000007">add_activity</a>
|
88
|
-
<a href="#M000010">add_activity</a>
|
89
|
-
<a href="#M000009">can_view?</a>
|
90
|
-
<a href="#M000012">can_view?</a>
|
91
|
-
<a href="#M000008">status</a>
|
92
|
-
<a href="#M000011">status</a>
|
93
|
-
</div>
|
94
|
-
</div>
|
95
|
-
|
96
|
-
</div>
|
97
|
-
|
98
|
-
|
99
|
-
<!-- if includes -->
|
100
|
-
|
101
|
-
<div id="section">
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
<!-- if method_list -->
|
111
|
-
<div id="methods">
|
112
|
-
<h3 class="section-bar">Public Instance methods</h3>
|
113
|
-
|
114
|
-
<div id="method-M000007" class="method-detail">
|
115
|
-
<a name="M000007"></a>
|
116
|
-
|
117
|
-
<div class="method-heading">
|
118
|
-
<a href="#M000007" class="method-signature">
|
119
|
-
<span class="method-name">add_activity</span><span class="method-args">(feed_to, source, item, template, title = '', content = '', check_method = nil)</span>
|
120
|
-
</a>
|
121
|
-
</div>
|
122
|
-
|
123
|
-
<div class="method-description">
|
124
|
-
<p>
|
125
|
-
<tt><a href="InstanceMethods.html#M000007">add_activity</a></tt> adds an
|
126
|
-
activity to all activites feeds that belong to the objects found in
|
127
|
-
feed_to.
|
128
|
-
</p>
|
129
|
-
<ul>
|
130
|
-
<li><tt>feed_to</tt>: an array of objects that have <tt>has_activities</tt>
|
131
|
-
declared on them. The generated activity will be pushed into the feed of
|
132
|
-
each of these objects.
|
133
|
-
|
134
|
-
</li>
|
135
|
-
<li><tt>source</tt>: the object that peformed the activity ie a user or group
|
136
|
-
|
137
|
-
</li>
|
138
|
-
<li><tt>item</tt>: an object that will be used to generated the entry in an
|
139
|
-
activity feed
|
140
|
-
|
141
|
-
</li>
|
142
|
-
<li><tt>template</tt>: name of an partial that will be used to generated the
|
143
|
-
entry in the activity feed. Place templates in
|
144
|
-
/app/views/activity_templates
|
145
|
-
|
146
|
-
</li>
|
147
|
-
<li><tt>title</tt>: optional title that can be used in the template
|
148
|
-
|
149
|
-
</li>
|
150
|
-
<li><tt>content</tt>: option content that can be used in the template. Useful
|
151
|
-
for activities that might not have
|
152
|
-
|
153
|
-
<pre>
|
154
|
-
an item but instead might have a message or other text.
|
155
|
-
</pre>
|
156
|
-
</li>
|
157
|
-
<li><tt>check_method</tt>: method that will be called on each item in the
|
158
|
-
feed_to array. If the method evaluates to false the activity won‘t be
|
159
|
-
added to the object‘s activity feed. An example usage would be
|
160
|
-
letting users configure which items they want to have in their activity
|
161
|
-
feed.
|
162
|
-
|
163
|
-
</li>
|
164
|
-
</ul>
|
165
|
-
<p><a class="source-toggle" href="#"
|
166
|
-
onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
|
167
|
-
<div class="method-source-code" id="M000007-source">
|
168
|
-
<pre>
|
169
|
-
<span class="ruby-comment cmt"># File lib/muck_activities/active_record/acts/muck_activity.rb, line 45</span>
|
170
|
-
45: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_activity</span>(<span class="ruby-identifier">feed_to</span>, <span class="ruby-identifier">source</span>, <span class="ruby-identifier">item</span>, <span class="ruby-identifier">template</span>, <span class="ruby-identifier">title</span> = <span class="ruby-value str">''</span>, <span class="ruby-identifier">content</span> = <span class="ruby-value str">''</span>, <span class="ruby-identifier">check_method</span> = <span class="ruby-keyword kw">nil</span>)
|
171
|
-
46: <span class="ruby-identifier">feed_to</span> = [<span class="ruby-identifier">feed_to</span>] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">feed_to</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
|
172
|
-
47: <span class="ruby-identifier">activity</span> = <span class="ruby-constant">Activity</span>.<span class="ruby-identifier">create</span>(<span class="ruby-identifier">:item</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">item</span>, <span class="ruby-identifier">:source</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">source</span>, <span class="ruby-identifier">:template</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">template</span>, <span class="ruby-identifier">:title</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">title</span>, <span class="ruby-identifier">:content</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">content</span>)
|
173
|
-
48: <span class="ruby-identifier">feed_to</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ft</span><span class="ruby-operator">|</span>
|
174
|
-
49: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">check_method</span>
|
175
|
-
50: <span class="ruby-identifier">ft</span>.<span class="ruby-identifier">activities</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">activity</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ft</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">check_method</span>)
|
176
|
-
51: <span class="ruby-keyword kw">else</span>
|
177
|
-
52: <span class="ruby-identifier">ft</span>.<span class="ruby-identifier">activities</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">activity</span>
|
178
|
-
53: <span class="ruby-keyword kw">end</span>
|
179
|
-
54: <span class="ruby-keyword kw">end</span>
|
180
|
-
55: <span class="ruby-keyword kw">end</span>
|
181
|
-
</pre>
|
182
|
-
</div>
|
183
|
-
</div>
|
184
|
-
</div>
|
185
|
-
|
186
|
-
<div id="method-M000010" class="method-detail">
|
187
|
-
<a name="M000010"></a>
|
188
|
-
|
189
|
-
<div class="method-heading">
|
190
|
-
<a href="#M000010" class="method-signature">
|
191
|
-
<span class="method-name">add_activity</span><span class="method-args">(feed_to, source, item, template, title = '', content = '', check_method = nil)</span>
|
192
|
-
</a>
|
193
|
-
</div>
|
194
|
-
|
195
|
-
<div class="method-description">
|
196
|
-
<p>
|
197
|
-
<tt><a href="InstanceMethods.html#M000007">add_activity</a></tt> adds an
|
198
|
-
activity to all activites feeds that belong to the objects found in
|
199
|
-
feed_to.
|
200
|
-
</p>
|
201
|
-
<ul>
|
202
|
-
<li><tt>feed_to</tt>: an array of objects that have <tt>has_activities</tt>
|
203
|
-
declared on them. The generated activity will be pushed into the feed of
|
204
|
-
each of these objects.
|
205
|
-
|
206
|
-
</li>
|
207
|
-
<li><tt>source</tt>: the object that peformed the activity ie a user or group
|
208
|
-
|
209
|
-
</li>
|
210
|
-
<li><tt>item</tt>: an object that will be used to generated the entry in an
|
211
|
-
activity feed
|
212
|
-
|
213
|
-
</li>
|
214
|
-
<li><tt>template</tt>: name of an partial that will be used to generated the
|
215
|
-
entry in the activity feed. Place templates in
|
216
|
-
/app/views/activity_templates
|
217
|
-
|
218
|
-
</li>
|
219
|
-
<li><tt>title</tt>: optional title that can be used in the template
|
220
|
-
|
221
|
-
</li>
|
222
|
-
<li><tt>content</tt>: option content that can be used in the template. Useful
|
223
|
-
for activities that might not have
|
224
|
-
|
225
|
-
<pre>
|
226
|
-
an item but instead might have a message or other text.
|
227
|
-
</pre>
|
228
|
-
</li>
|
229
|
-
<li><tt>check_method</tt>: method that will be called on each item in the
|
230
|
-
feed_to array. If the method evaluates to false the activity won‘t be
|
231
|
-
added to the object‘s activity feed. An example usage would be
|
232
|
-
letting users configure which items they want to have in their activity
|
233
|
-
feed.
|
234
|
-
|
235
|
-
</li>
|
236
|
-
</ul>
|
237
|
-
<p><a class="source-toggle" href="#"
|
238
|
-
onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
|
239
|
-
<div class="method-source-code" id="M000010-source">
|
240
|
-
<pre>
|
241
|
-
<span class="ruby-comment cmt"># File lib/muck_activities/muck_activity.rb, line 45</span>
|
242
|
-
45: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_activity</span>(<span class="ruby-identifier">feed_to</span>, <span class="ruby-identifier">source</span>, <span class="ruby-identifier">item</span>, <span class="ruby-identifier">template</span>, <span class="ruby-identifier">title</span> = <span class="ruby-value str">''</span>, <span class="ruby-identifier">content</span> = <span class="ruby-value str">''</span>, <span class="ruby-identifier">check_method</span> = <span class="ruby-keyword kw">nil</span>)
|
243
|
-
46: <span class="ruby-identifier">feed_to</span> = [<span class="ruby-identifier">feed_to</span>] <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">feed_to</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>)
|
244
|
-
47: <span class="ruby-identifier">activity</span> = <span class="ruby-constant">Activity</span>.<span class="ruby-identifier">create</span>(<span class="ruby-identifier">:item</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">item</span>, <span class="ruby-identifier">:source</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">source</span>, <span class="ruby-identifier">:template</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">template</span>, <span class="ruby-identifier">:title</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">title</span>, <span class="ruby-identifier">:content</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">content</span>)
|
245
|
-
48: <span class="ruby-identifier">feed_to</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">ft</span><span class="ruby-operator">|</span>
|
246
|
-
49: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">check_method</span>
|
247
|
-
50: <span class="ruby-identifier">ft</span>.<span class="ruby-identifier">activities</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">activity</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">ft</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">check_method</span>)
|
248
|
-
51: <span class="ruby-keyword kw">else</span>
|
249
|
-
52: <span class="ruby-identifier">ft</span>.<span class="ruby-identifier">activities</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">activity</span>
|
250
|
-
53: <span class="ruby-keyword kw">end</span>
|
251
|
-
54: <span class="ruby-keyword kw">end</span>
|
252
|
-
55: <span class="ruby-keyword kw">end</span>
|
253
|
-
</pre>
|
254
|
-
</div>
|
255
|
-
</div>
|
256
|
-
</div>
|
257
|
-
|
258
|
-
<div id="method-M000009" class="method-detail">
|
259
|
-
<a name="M000009"></a>
|
260
|
-
|
261
|
-
<div class="method-heading">
|
262
|
-
<a href="#M000009" class="method-signature">
|
263
|
-
<span class="method-name">can_view?</span><span class="method-args">(check_object)</span>
|
264
|
-
</a>
|
265
|
-
</div>
|
266
|
-
|
267
|
-
<div class="method-description">
|
268
|
-
<p><a class="source-toggle" href="#"
|
269
|
-
onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
|
270
|
-
<div class="method-source-code" id="M000009-source">
|
271
|
-
<pre>
|
272
|
-
<span class="ruby-comment cmt"># File lib/muck_activities/active_record/acts/muck_activity.rb, line 63</span>
|
273
|
-
63: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">can_view?</span>(<span class="ruby-identifier">check_object</span>)
|
274
|
-
64: <span class="ruby-keyword kw">self</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">check_object</span>
|
275
|
-
65: <span class="ruby-keyword kw">end</span>
|
276
|
-
</pre>
|
277
|
-
</div>
|
278
|
-
</div>
|
279
|
-
</div>
|
280
|
-
|
281
|
-
<div id="method-M000012" class="method-detail">
|
282
|
-
<a name="M000012"></a>
|
283
|
-
|
284
|
-
<div class="method-heading">
|
285
|
-
<a href="#M000012" class="method-signature">
|
286
|
-
<span class="method-name">can_view?</span><span class="method-args">(check_object)</span>
|
287
|
-
</a>
|
288
|
-
</div>
|
289
|
-
|
290
|
-
<div class="method-description">
|
291
|
-
<p><a class="source-toggle" href="#"
|
292
|
-
onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
|
293
|
-
<div class="method-source-code" id="M000012-source">
|
294
|
-
<pre>
|
295
|
-
<span class="ruby-comment cmt"># File lib/muck_activities/muck_activity.rb, line 63</span>
|
296
|
-
63: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">can_view?</span>(<span class="ruby-identifier">check_object</span>)
|
297
|
-
64: <span class="ruby-keyword kw">self</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">check_object</span>
|
298
|
-
65: <span class="ruby-keyword kw">end</span>
|
299
|
-
</pre>
|
300
|
-
</div>
|
301
|
-
</div>
|
302
|
-
</div>
|
303
|
-
|
304
|
-
<div id="method-M000008" class="method-detail">
|
305
|
-
<a name="M000008"></a>
|
306
|
-
|
307
|
-
<div class="method-heading">
|
308
|
-
<a href="#M000008" class="method-signature">
|
309
|
-
<span class="method-name">status</span><span class="method-args">()</span>
|
310
|
-
</a>
|
311
|
-
</div>
|
312
|
-
|
313
|
-
<div class="method-description">
|
314
|
-
<p>
|
315
|
-
<tt><a href="InstanceMethods.html#M000008">status</a></tt> returns the
|
316
|
-
first activity item from the user‘s activity feed that is a <a
|
317
|
-
href="InstanceMethods.html#M000008">status</a> update. Used for displaying
|
318
|
-
the last <a href="InstanceMethods.html#M000008">status</a> update the user
|
319
|
-
made
|
320
|
-
</p>
|
321
|
-
<p><a class="source-toggle" href="#"
|
322
|
-
onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
|
323
|
-
<div class="method-source-code" id="M000008-source">
|
324
|
-
<pre>
|
325
|
-
<span class="ruby-comment cmt"># File lib/muck_activities/active_record/acts/muck_activity.rb, line 59</span>
|
326
|
-
59: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">status</span>
|
327
|
-
60: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">activities</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">:first</span>, <span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">></span> [<span class="ruby-value str">'is_status_update = true'</span>], <span class="ruby-identifier">:order</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'created_at DESC'</span>)
|
328
|
-
61: <span class="ruby-keyword kw">end</span>
|
329
|
-
</pre>
|
330
|
-
</div>
|
331
|
-
</div>
|
332
|
-
</div>
|
333
|
-
|
334
|
-
<div id="method-M000011" class="method-detail">
|
335
|
-
<a name="M000011"></a>
|
336
|
-
|
337
|
-
<div class="method-heading">
|
338
|
-
<a href="#M000011" class="method-signature">
|
339
|
-
<span class="method-name">status</span><span class="method-args">()</span>
|
340
|
-
</a>
|
341
|
-
</div>
|
342
|
-
|
343
|
-
<div class="method-description">
|
344
|
-
<p>
|
345
|
-
<tt><a href="InstanceMethods.html#M000008">status</a></tt> returns the
|
346
|
-
first activity item from the user‘s activity feed that is a <a
|
347
|
-
href="InstanceMethods.html#M000008">status</a> update. Used for displaying
|
348
|
-
the last <a href="InstanceMethods.html#M000008">status</a> update the user
|
349
|
-
made
|
350
|
-
</p>
|
351
|
-
<p><a class="source-toggle" href="#"
|
352
|
-
onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
|
353
|
-
<div class="method-source-code" id="M000011-source">
|
354
|
-
<pre>
|
355
|
-
<span class="ruby-comment cmt"># File lib/muck_activities/muck_activity.rb, line 59</span>
|
356
|
-
59: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">status</span>
|
357
|
-
60: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">activities</span>.<span class="ruby-identifier">find</span>(<span class="ruby-identifier">:first</span>, <span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">></span> [<span class="ruby-value str">'is_status_update = true'</span>], <span class="ruby-identifier">:order</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'created_at DESC'</span>)
|
358
|
-
61: <span class="ruby-keyword kw">end</span>
|
359
|
-
</pre>
|
360
|
-
</div>
|
361
|
-
</div>
|
362
|
-
</div>
|
363
|
-
|
364
|
-
|
365
|
-
</div>
|
366
|
-
|
367
|
-
|
368
|
-
</div>
|
369
|
-
|
370
|
-
|
371
|
-
<div id="validator-badges">
|
372
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
373
|
-
</div>
|
374
|
-
|
375
|
-
</body>
|
376
|
-
</html>
|
data/rdoc/created.rid
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
Fri, 19 Jun 2009 02:12:00 -0600
|