loggable_activity 0.5.6 → 0.5.7
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/GETTING-STARTED.md +1 -0
- data/docker-compose.yml +27 -0
- data/docs/CHANGELOG_md.html +318 -0
- data/docs/CHEAT_SHEET_md.html +168 -0
- data/docs/CODE_OF_CONDUCT_md.html +250 -0
- data/docs/CreateLoggableActivities.html +175 -0
- data/docs/CreateLoggableActivityTables.html +173 -0
- data/docs/GETTING-STARTED_md.html +211 -0
- data/docs/Gemfile.html +153 -0
- data/docs/Gemfile_lock.html +438 -0
- data/docs/LoggableActivity/ActivitiesController.html +160 -0
- data/docs/LoggableActivity/ActivitiesHelper.html +158 -0
- data/docs/LoggableActivity/Activity.html +565 -0
- data/docs/LoggableActivity/ApplicationController.html +97 -0
- data/docs/LoggableActivity/ApplicationHelper.html +91 -0
- data/docs/LoggableActivity/ApplicationJob.html +97 -0
- data/docs/LoggableActivity/ApplicationMailer.html +97 -0
- data/docs/LoggableActivity/ApplicationRecord.html +97 -0
- data/docs/LoggableActivity/Configuration.html +237 -0
- data/docs/LoggableActivity/ConfigurationError.html +142 -0
- data/docs/LoggableActivity/CurrentActor.html +166 -0
- data/docs/LoggableActivity/DataOwner.html +138 -0
- data/docs/LoggableActivity/Encryption.html +321 -0
- data/docs/LoggableActivity/EncryptionError.html +142 -0
- data/docs/LoggableActivity/EncryptionKey.html +399 -0
- data/docs/LoggableActivity/Engine.html +108 -0
- data/docs/LoggableActivity/Error.html +142 -0
- data/docs/LoggableActivity/Generators/InstallGenerator.html +212 -0
- data/docs/LoggableActivity/Generators.html +91 -0
- data/docs/LoggableActivity/Hooks.html +841 -0
- data/docs/LoggableActivity/Payload.html +430 -0
- data/docs/LoggableActivity/Sanitizer.html +134 -0
- data/docs/LoggableActivity/Services/BasePayloadsBuilder.html +472 -0
- data/docs/LoggableActivity/Services/CustomPayloadsBuilder.html +225 -0
- data/docs/LoggableActivity/Services/DestroyPayloadsBuilder.html +396 -0
- data/docs/LoggableActivity/Services/PayloadsBuilder.html +348 -0
- data/docs/LoggableActivity/Services/UpdatePayloadsBuilder.html +540 -0
- data/docs/LoggableActivity/Services.html +93 -0
- data/docs/LoggableActivity.html +173 -0
- data/docs/MIT-LICENSE.html +132 -0
- data/docs/Object.html +110 -0
- data/docs/README_md.html +186 -0
- data/docs/Rakefile.html +134 -0
- data/docs/app/assets/config/loggable_activity_manifest_js.html +126 -0
- data/docs/app/assets/javascripts/loggable_activity/application_js.html +124 -0
- data/docs/app/assets/stylesheets/loggable_activity/activities_scss.html +154 -0
- data/docs/app/assets/stylesheets/loggable_activity/application_scss.html +142 -0
- data/docs/app/views/layouts/loggable_activity/application_html_slim.html +145 -0
- data/docs/app/views/loggable_activity/activities/_activities_html_slim.html +159 -0
- data/docs/created.rid +74 -0
- data/docs/css/fonts.css +167 -0
- data/docs/css/rdoc.css +687 -0
- data/docs/fonts/Lato-Light.ttf +0 -0
- data/docs/fonts/Lato-LightItalic.ttf +0 -0
- data/docs/fonts/Lato-Regular.ttf +0 -0
- data/docs/fonts/Lato-RegularItalic.ttf +0 -0
- data/docs/fonts/SourceCodePro-Bold.ttf +0 -0
- data/docs/fonts/SourceCodePro-Regular.ttf +0 -0
- data/docs/git-org/HEAD.html +126 -0
- data/docs/git-org/config.html +128 -0
- data/docs/git-org/description.html +126 -0
- data/docs/git-org/hooks/applypatch-msg_sample.html +128 -0
- data/docs/git-org/hooks/commit-msg_sample.html +138 -0
- data/docs/git-org/hooks/fsmonitor-watchman_sample.html +302 -0
- data/docs/git-org/hooks/post-update_sample.html +128 -0
- data/docs/git-org/hooks/pre-applypatch_sample.html +128 -0
- data/docs/git-org/hooks/pre-commit_sample.html +174 -0
- data/docs/git-org/hooks/pre-merge-commit_sample.html +133 -0
- data/docs/git-org/hooks/pre-push_sample.html +161 -0
- data/docs/git-org/hooks/pre-rebase_sample.html +282 -0
- data/docs/git-org/hooks/pre-receive_sample.html +144 -0
- data/docs/git-org/hooks/prepare-commit-msg_sample.html +136 -0
- data/docs/git-org/hooks/push-to-checkout_sample.html +178 -0
- data/docs/git-org/hooks/update_sample.html +226 -0
- data/docs/git-org/info/exclude.html +126 -0
- data/docs/images/add.png +0 -0
- data/docs/images/arrow_up.png +0 -0
- data/docs/images/brick.png +0 -0
- data/docs/images/brick_link.png +0 -0
- data/docs/images/bug.png +0 -0
- data/docs/images/bullet_black.png +0 -0
- data/docs/images/bullet_toggle_minus.png +0 -0
- data/docs/images/bullet_toggle_plus.png +0 -0
- data/docs/images/date.png +0 -0
- data/docs/images/delete.png +0 -0
- data/docs/images/find.png +0 -0
- data/docs/images/loadingAnimation.gif +0 -0
- data/docs/images/macFFBgHack.png +0 -0
- data/docs/images/package.png +0 -0
- data/docs/images/page_green.png +0 -0
- data/docs/images/page_white_text.png +0 -0
- data/docs/images/page_white_width.png +0 -0
- data/docs/images/plugin.png +0 -0
- data/docs/images/ruby.png +0 -0
- data/docs/images/tag_blue.png +0 -0
- data/docs/images/tag_green.png +0 -0
- data/docs/images/transparent.png +0 -0
- data/docs/images/wrench.png +0 -0
- data/docs/images/wrench_orange.png +0 -0
- data/docs/images/zoom.png +0 -0
- data/docs/index.html +166 -0
- data/docs/js/darkfish.js +97 -0
- data/docs/js/navigation.js +105 -0
- data/docs/js/navigation.js.gz +0 -0
- data/docs/js/search.js +110 -0
- data/docs/js/search_index.js +1 -0
- data/docs/js/search_index.js.gz +0 -0
- data/docs/js/searcher.js +229 -0
- data/docs/js/searcher.js.gz +0 -0
- data/docs/lib/loggable_activity/config_schema_json.html +205 -0
- data/docs/lib/tasks/loggable_activity_tasks_rake.html +128 -0
- data/docs/table_of_contents.html +954 -0
- data/lib/loggable_activity/concerns/current_actor.rb +25 -0
- data/lib/loggable_activity/hooks.rb +41 -19
- data/lib/loggable_activity/version.rb +1 -1
- data/lib/loggable_activity.rb +1 -1
- metadata +114 -3
- data/lib/loggable_activity/concerns/current_user.rb +0 -26
@@ -0,0 +1,237 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class LoggableActivity::Configuration - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="../js/navigation.js" defer></script>
|
15
|
+
<script src="../js/search.js" defer></script>
|
16
|
+
<script src="../js/search_index.js" defer></script>
|
17
|
+
<script src="../js/searcher.js" defer></script>
|
18
|
+
<script src="../js/darkfish.js" defer></script>
|
19
|
+
|
20
|
+
<link href="../css/fonts.css" rel="stylesheet">
|
21
|
+
<link href="../css/rdoc.css" rel="stylesheet">
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="class">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="../index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<div id="class-metadata">
|
59
|
+
|
60
|
+
|
61
|
+
<div id="parent-class-section" class="nav-section">
|
62
|
+
<h3>Parent</h3>
|
63
|
+
|
64
|
+
<p class="link"><a href="../Object.html">Object</a>
|
65
|
+
</div>
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
<!-- Method Quickref -->
|
71
|
+
<div id="method-list-section" class="nav-section">
|
72
|
+
<h3>Methods</h3>
|
73
|
+
|
74
|
+
<ul class="link-list" role="directory">
|
75
|
+
<li ><a href="#method-c-config_data">::config_data</a>
|
76
|
+
<li ><a href="#method-c-for_class">::for_class</a>
|
77
|
+
<li ><a href="#method-c-load_schema">::load_schema</a>
|
78
|
+
<li ><a href="#method-c-validate_config_file">::validate_config_file</a>
|
79
|
+
</ul>
|
80
|
+
</div>
|
81
|
+
|
82
|
+
</div>
|
83
|
+
</nav>
|
84
|
+
|
85
|
+
<main role="main" aria-labelledby="class-LoggableActivity::Configuration">
|
86
|
+
<h1 id="class-LoggableActivity::Configuration" class="class">
|
87
|
+
class LoggableActivity::Configuration
|
88
|
+
</h1>
|
89
|
+
|
90
|
+
<section class="description">
|
91
|
+
|
92
|
+
<p>This class is used to load the configuration file located at config/loggable_activity.yml When the LoggableActivity::Hook is included in a model it takes the model’s name and find the configuration for that model in the configuration file.</p>
|
93
|
+
|
94
|
+
</section>
|
95
|
+
|
96
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
103
|
+
<header>
|
104
|
+
<h3>Public Class Methods</h3>
|
105
|
+
</header>
|
106
|
+
|
107
|
+
<div id="method-c-config_data" class="method-detail ">
|
108
|
+
<div class="method-header">
|
109
|
+
<div class="method-heading">
|
110
|
+
<span class="method-name">config_data</span><span
|
111
|
+
class="method-args">()</span>
|
112
|
+
<span class="method-click-advice">click to toggle source</span>
|
113
|
+
</div>
|
114
|
+
</div>
|
115
|
+
|
116
|
+
<div class="method-description">
|
117
|
+
<p>Loads the configuration file, and store it as a hash</p>
|
118
|
+
|
119
|
+
<div class="method-source-code" id="config_data-source">
|
120
|
+
<pre><span class="ruby-comment"># File lib/loggable_activity/configuration.rb, line 19</span>
|
121
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">config_data</span>
|
122
|
+
<span class="ruby-ivar">@config_data</span> <span class="ruby-operator">||=</span> <span class="ruby-constant">YAML</span>.<span class="ruby-identifier">load_file</span>(<span class="ruby-constant">LoggableActivity</span>.<span class="ruby-identifier">config_file_path</span>)
|
123
|
+
<span class="ruby-keyword">end</span></pre>
|
124
|
+
</div>
|
125
|
+
</div>
|
126
|
+
|
127
|
+
|
128
|
+
</div>
|
129
|
+
|
130
|
+
<div id="method-c-for_class" class="method-detail ">
|
131
|
+
<div class="method-header">
|
132
|
+
<div class="method-heading">
|
133
|
+
<span class="method-name">for_class</span><span
|
134
|
+
class="method-args">(class_name)</span>
|
135
|
+
<span class="method-click-advice">click to toggle source</span>
|
136
|
+
</div>
|
137
|
+
</div>
|
138
|
+
|
139
|
+
<div class="method-description">
|
140
|
+
<p>Returns the configuration data for the given class</p>
|
141
|
+
|
142
|
+
<p>Example:</p>
|
143
|
+
|
144
|
+
<pre class="ruby"><span class="ruby-operator">::</span><span class="ruby-constant">LoggableActivity</span><span class="ruby-operator">::</span><span class="ruby-constant">Configuration</span>.<span class="ruby-identifier">for_class</span>(<span class="ruby-string">'User'</span>)
|
145
|
+
</pre>
|
146
|
+
|
147
|
+
<p>Returns:</p>
|
148
|
+
|
149
|
+
<pre>{
|
150
|
+
"fetch_record_name_from": "full_name",
|
151
|
+
"loggable_attrs": [
|
152
|
+
"first_name",
|
153
|
+
"last_name",
|
154
|
+
],
|
155
|
+
"auto_log": [
|
156
|
+
"create",
|
157
|
+
"update",
|
158
|
+
"destroy"
|
159
|
+
],
|
160
|
+
....
|
161
|
+
}</pre>
|
162
|
+
|
163
|
+
<div class="method-source-code" id="for_class-source">
|
164
|
+
<pre><span class="ruby-comment"># File lib/loggable_activity/configuration.rb, line 51</span>
|
165
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">for_class</span>(<span class="ruby-identifier">class_name</span>)
|
166
|
+
<span class="ruby-identifier">config_data</span>[<span class="ruby-identifier">class_name</span>]
|
167
|
+
<span class="ruby-keyword">end</span></pre>
|
168
|
+
</div>
|
169
|
+
</div>
|
170
|
+
|
171
|
+
|
172
|
+
</div>
|
173
|
+
|
174
|
+
<div id="method-c-load_schema" class="method-detail ">
|
175
|
+
<div class="method-header">
|
176
|
+
<div class="method-heading">
|
177
|
+
<span class="method-name">load_schema</span><span
|
178
|
+
class="method-args">()</span>
|
179
|
+
<span class="method-click-advice">click to toggle source</span>
|
180
|
+
</div>
|
181
|
+
</div>
|
182
|
+
|
183
|
+
<div class="method-description">
|
184
|
+
<p>Loads the schema file for the configuration file</p>
|
185
|
+
|
186
|
+
<div class="method-source-code" id="load_schema-source">
|
187
|
+
<pre><span class="ruby-comment"># File lib/loggable_activity/configuration.rb, line 13</span>
|
188
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">load_schema</span>
|
189
|
+
<span class="ruby-identifier">schema_path</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-identifier">__dir__</span>, <span class="ruby-string">'config_schema.json'</span>)
|
190
|
+
<span class="ruby-constant">JSON</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">schema_path</span>))
|
191
|
+
<span class="ruby-keyword">end</span></pre>
|
192
|
+
</div>
|
193
|
+
</div>
|
194
|
+
|
195
|
+
|
196
|
+
</div>
|
197
|
+
|
198
|
+
<div id="method-c-validate_config_file" class="method-detail ">
|
199
|
+
<div class="method-header">
|
200
|
+
<div class="method-heading">
|
201
|
+
<span class="method-name">validate_config_file</span><span
|
202
|
+
class="method-args">()</span>
|
203
|
+
<span class="method-click-advice">click to toggle source</span>
|
204
|
+
</div>
|
205
|
+
</div>
|
206
|
+
|
207
|
+
<div class="method-description">
|
208
|
+
<p>Validates the configuration file againss the schema</p>
|
209
|
+
|
210
|
+
<div class="method-source-code" id="validate_config_file-source">
|
211
|
+
<pre><span class="ruby-comment"># File lib/loggable_activity/configuration.rb, line 24</span>
|
212
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">validate_config_file</span>
|
213
|
+
<span class="ruby-identifier">schema</span> = <span class="ruby-identifier">load_schema</span>
|
214
|
+
<span class="ruby-identifier">errors</span> = <span class="ruby-constant">JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">Validator</span>.<span class="ruby-identifier">fully_validate</span>(<span class="ruby-identifier">schema</span>, <span class="ruby-identifier">config_data</span>)
|
215
|
+
<span class="ruby-keyword">return</span> <span class="ruby-keyword">true</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">errors</span>.<span class="ruby-identifier">any?</span>
|
216
|
+
|
217
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">ConfigurationError</span>,
|
218
|
+
<span class="ruby-node">"config/loggable_activity.yaml is invalid: #{errors.join(', ')}"</span>
|
219
|
+
<span class="ruby-keyword">end</span></pre>
|
220
|
+
</div>
|
221
|
+
</div>
|
222
|
+
|
223
|
+
|
224
|
+
</div>
|
225
|
+
|
226
|
+
</section>
|
227
|
+
|
228
|
+
</section>
|
229
|
+
</main>
|
230
|
+
|
231
|
+
|
232
|
+
<footer id="validator-badges" role="contentinfo">
|
233
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
234
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.7.0.
|
235
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
236
|
+
</footer>
|
237
|
+
|
@@ -0,0 +1,142 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class LoggableActivity::ConfigurationError - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="../js/navigation.js" defer></script>
|
15
|
+
<script src="../js/search.js" defer></script>
|
16
|
+
<script src="../js/search_index.js" defer></script>
|
17
|
+
<script src="../js/searcher.js" defer></script>
|
18
|
+
<script src="../js/darkfish.js" defer></script>
|
19
|
+
|
20
|
+
<link href="../css/fonts.css" rel="stylesheet">
|
21
|
+
<link href="../css/rdoc.css" rel="stylesheet">
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="class">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="../index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<div id="class-metadata">
|
59
|
+
|
60
|
+
|
61
|
+
<div id="parent-class-section" class="nav-section">
|
62
|
+
<h3>Parent</h3>
|
63
|
+
|
64
|
+
<p class="link">StandardError
|
65
|
+
</div>
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
<!-- Method Quickref -->
|
71
|
+
<div id="method-list-section" class="nav-section">
|
72
|
+
<h3>Methods</h3>
|
73
|
+
|
74
|
+
<ul class="link-list" role="directory">
|
75
|
+
<li class="calls-super" ><a href="#method-c-new">::new</a>
|
76
|
+
</ul>
|
77
|
+
</div>
|
78
|
+
|
79
|
+
</div>
|
80
|
+
</nav>
|
81
|
+
|
82
|
+
<main role="main" aria-labelledby="class-LoggableActivity::ConfigurationError">
|
83
|
+
<h1 id="class-LoggableActivity::ConfigurationError" class="class">
|
84
|
+
class LoggableActivity::ConfigurationError
|
85
|
+
</h1>
|
86
|
+
|
87
|
+
<section class="description">
|
88
|
+
|
89
|
+
<p>This class is used to load the configuration file located at config/loggable_activity.yml</p>
|
90
|
+
|
91
|
+
</section>
|
92
|
+
|
93
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
100
|
+
<header>
|
101
|
+
<h3>Public Class Methods</h3>
|
102
|
+
</header>
|
103
|
+
|
104
|
+
<div id="method-c-new" class="method-detail ">
|
105
|
+
<div class="method-header">
|
106
|
+
<div class="method-heading">
|
107
|
+
<span class="method-name">new</span><span
|
108
|
+
class="method-args">(msg = '')</span>
|
109
|
+
<span class="method-click-advice">click to toggle source</span>
|
110
|
+
</div>
|
111
|
+
</div>
|
112
|
+
|
113
|
+
<div class="method-description">
|
114
|
+
|
115
|
+
<div class="method-calls-super">
|
116
|
+
Calls superclass method
|
117
|
+
|
118
|
+
</div>
|
119
|
+
|
120
|
+
<div class="method-source-code" id="new-source">
|
121
|
+
<pre><span class="ruby-comment"># File lib/loggable_activity/error.rb, line 20</span>
|
122
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">msg</span> = <span class="ruby-string">''</span>)
|
123
|
+
<span class="ruby-keyword">super</span>
|
124
|
+
<span class="ruby-keyword">end</span></pre>
|
125
|
+
</div>
|
126
|
+
</div>
|
127
|
+
|
128
|
+
|
129
|
+
</div>
|
130
|
+
|
131
|
+
</section>
|
132
|
+
|
133
|
+
</section>
|
134
|
+
</main>
|
135
|
+
|
136
|
+
|
137
|
+
<footer id="validator-badges" role="contentinfo">
|
138
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
139
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.7.0.
|
140
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
141
|
+
</footer>
|
142
|
+
|
@@ -0,0 +1,166 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>module LoggableActivity::CurrentActor - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="../js/navigation.js" defer></script>
|
15
|
+
<script src="../js/search.js" defer></script>
|
16
|
+
<script src="../js/search_index.js" defer></script>
|
17
|
+
<script src="../js/searcher.js" defer></script>
|
18
|
+
<script src="../js/darkfish.js" defer></script>
|
19
|
+
|
20
|
+
<link href="../css/fonts.css" rel="stylesheet">
|
21
|
+
<link href="../css/rdoc.css" rel="stylesheet">
|
22
|
+
|
23
|
+
|
24
|
+
<body id="top" role="document" class="module">
|
25
|
+
<nav role="navigation">
|
26
|
+
<div id="project-navigation">
|
27
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
28
|
+
<h2>
|
29
|
+
<a href="../index.html" rel="home">Home</a>
|
30
|
+
</h2>
|
31
|
+
|
32
|
+
<div id="table-of-contents-navigation">
|
33
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
34
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
35
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
36
|
+
</div>
|
37
|
+
</div>
|
38
|
+
|
39
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
40
|
+
<form action="#" method="get" accept-charset="utf-8">
|
41
|
+
<div id="search-field-wrapper">
|
42
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
43
|
+
aria-autocomplete="list" aria-controls="search-results"
|
44
|
+
type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
|
45
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
46
|
+
</div>
|
47
|
+
|
48
|
+
<ul id="search-results" aria-label="Search Results"
|
49
|
+
aria-busy="false" aria-expanded="false"
|
50
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
51
|
+
</form>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
</div>
|
55
|
+
|
56
|
+
|
57
|
+
|
58
|
+
<div id="class-metadata">
|
59
|
+
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
<div id="extends-section" class="nav-section">
|
64
|
+
<h3>Extended With Modules</h3>
|
65
|
+
|
66
|
+
<ul class="link-list">
|
67
|
+
<li><span class="extend">ActiveSupport::Concern</span>
|
68
|
+
</ul>
|
69
|
+
</div>
|
70
|
+
|
71
|
+
|
72
|
+
<!-- Method Quickref -->
|
73
|
+
<div id="method-list-section" class="nav-section">
|
74
|
+
<h3>Methods</h3>
|
75
|
+
|
76
|
+
<ul class="link-list" role="directory">
|
77
|
+
<li ><a href="#method-i-clear_current_actor">#clear_current_actor</a>
|
78
|
+
<li ><a href="#method-i-set_current_actor">#set_current_actor</a>
|
79
|
+
</ul>
|
80
|
+
</div>
|
81
|
+
|
82
|
+
</div>
|
83
|
+
</nav>
|
84
|
+
|
85
|
+
<main role="main" aria-labelledby="module-LoggableActivity::CurrentActor">
|
86
|
+
<h1 id="module-LoggableActivity::CurrentActor" class="module">
|
87
|
+
module LoggableActivity::CurrentActor
|
88
|
+
</h1>
|
89
|
+
|
90
|
+
<section class="description">
|
91
|
+
|
92
|
+
<p>Stores current user in a thread variable so is can be accessed from the LoggableActivity::Hook model</p>
|
93
|
+
|
94
|
+
</section>
|
95
|
+
|
96
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
<section id="private-instance-5Buntitled-5D-method-details" class="method-section">
|
103
|
+
<header>
|
104
|
+
<h3>Private Instance Methods</h3>
|
105
|
+
</header>
|
106
|
+
|
107
|
+
<div id="method-i-clear_current_actor" class="method-detail ">
|
108
|
+
<div class="method-header">
|
109
|
+
<div class="method-heading">
|
110
|
+
<span class="method-name">clear_current_actor</span><span
|
111
|
+
class="method-args">()</span>
|
112
|
+
<span class="method-click-advice">click to toggle source</span>
|
113
|
+
</div>
|
114
|
+
</div>
|
115
|
+
|
116
|
+
<div class="method-description">
|
117
|
+
|
118
|
+
|
119
|
+
<div class="method-source-code" id="clear_current_actor-source">
|
120
|
+
<pre><span class="ruby-comment"># File lib/loggable_activity/concerns/current_actor.rb, line 21</span>
|
121
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">clear_current_actor</span>
|
122
|
+
<span class="ruby-constant">Thread</span>.<span class="ruby-identifier">current</span>[<span class="ruby-value">:current_actor</span>] = <span class="ruby-keyword">nil</span>
|
123
|
+
<span class="ruby-keyword">end</span></pre>
|
124
|
+
</div>
|
125
|
+
</div>
|
126
|
+
|
127
|
+
|
128
|
+
</div>
|
129
|
+
|
130
|
+
<div id="method-i-set_current_actor" class="method-detail ">
|
131
|
+
<div class="method-header">
|
132
|
+
<div class="method-heading">
|
133
|
+
<span class="method-name">set_current_actor</span><span
|
134
|
+
class="method-args">()</span>
|
135
|
+
<span class="method-click-advice">click to toggle source</span>
|
136
|
+
</div>
|
137
|
+
</div>
|
138
|
+
|
139
|
+
<div class="method-description">
|
140
|
+
|
141
|
+
|
142
|
+
<div class="method-source-code" id="set_current_actor-source">
|
143
|
+
<pre><span class="ruby-comment"># File lib/loggable_activity/concerns/current_actor.rb, line 15</span>
|
144
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">set_current_actor</span>
|
145
|
+
<span class="ruby-keyword">return</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">current_user</span>
|
146
|
+
|
147
|
+
<span class="ruby-constant">Thread</span>.<span class="ruby-identifier">current</span>[<span class="ruby-value">:current_actor</span>] = <span class="ruby-identifier">current_user</span>
|
148
|
+
<span class="ruby-keyword">end</span></pre>
|
149
|
+
</div>
|
150
|
+
</div>
|
151
|
+
|
152
|
+
|
153
|
+
</div>
|
154
|
+
|
155
|
+
</section>
|
156
|
+
|
157
|
+
</section>
|
158
|
+
</main>
|
159
|
+
|
160
|
+
|
161
|
+
<footer id="validator-badges" role="contentinfo">
|
162
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
163
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.7.0.
|
164
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
165
|
+
</footer>
|
166
|
+
|