loggable_activity 0.1.38b → 0.1.40

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/.document +1 -0
  3. data/.nojekyll +1 -0
  4. data/.rubocop.yml +1 -1
  5. data/CHANGELOG.md +2 -0
  6. data/GETTING-STARTED.md +10 -10
  7. data/README.md +8 -5
  8. data/ROADMAP.md +9 -5
  9. data/doc/.nojekyll +1 -0
  10. data/doc/CHANGELOG_md.html +125 -0
  11. data/doc/CODE_OF_CONDUCT_md.html +220 -0
  12. data/doc/CONSIDERTIONS_md.html +227 -0
  13. data/doc/CreateLoggableActivities.html +144 -0
  14. data/doc/CreateLoggableEncryptionKeys.html +140 -0
  15. data/doc/CreateLoggablePayloads.html +144 -0
  16. data/doc/GETTING-STARTED_md.html +186 -0
  17. data/doc/Gemfile.html +104 -0
  18. data/doc/Gemfile_lock.html +152 -0
  19. data/doc/LICENSE_txt.html +104 -0
  20. data/doc/LoggableActivity/CurrentUser.html +99 -0
  21. data/doc/LoggableActivity/Generators/InstallGenerator.html +178 -0
  22. data/doc/LoggableActivity/Generators.html +91 -0
  23. data/doc/README_md.html +138 -0
  24. data/doc/ROADMAP_md.html +151 -0
  25. data/doc/Rakefile.html +102 -0
  26. data/doc/bin/setup.html +100 -0
  27. data/doc/notes/CHEAT_SHEET_md.html +130 -0
  28. data/doc/sig/loggable_activity_rbs.html +101 -0
  29. data/docs/LoggableActivity/Activity.html +494 -0
  30. data/docs/LoggableActivity/Configuration.html +183 -0
  31. data/docs/LoggableActivity/Encryption.html +220 -0
  32. data/docs/LoggableActivity/EncryptionError.html +99 -0
  33. data/docs/LoggableActivity/EncryptionKey.html +327 -0
  34. data/docs/LoggableActivity/Error.html +97 -0
  35. data/docs/LoggableActivity/Hooks.html +172 -0
  36. data/docs/LoggableActivity/Payload.html +159 -0
  37. data/docs/LoggableActivity/PayloadsBuilder.html +154 -0
  38. data/docs/LoggableActivity/UpdatePayloadsBuilder.html +199 -0
  39. data/docs/LoggableActivity.html +100 -0
  40. data/docs/created.rid +10 -0
  41. data/docs/css/fonts.css +167 -0
  42. data/docs/css/rdoc.css +687 -0
  43. data/docs/fonts/Lato-Light.ttf +0 -0
  44. data/docs/fonts/Lato-LightItalic.ttf +0 -0
  45. data/docs/fonts/Lato-Regular.ttf +0 -0
  46. data/docs/fonts/Lato-RegularItalic.ttf +0 -0
  47. data/docs/fonts/SourceCodePro-Bold.ttf +0 -0
  48. data/docs/fonts/SourceCodePro-Regular.ttf +0 -0
  49. data/docs/images/add.png +0 -0
  50. data/docs/images/arrow_up.png +0 -0
  51. data/docs/images/brick.png +0 -0
  52. data/docs/images/brick_link.png +0 -0
  53. data/docs/images/bug.png +0 -0
  54. data/docs/images/bullet_black.png +0 -0
  55. data/docs/images/bullet_toggle_minus.png +0 -0
  56. data/docs/images/bullet_toggle_plus.png +0 -0
  57. data/docs/images/date.png +0 -0
  58. data/docs/images/delete.png +0 -0
  59. data/docs/images/find.png +0 -0
  60. data/docs/images/loadingAnimation.gif +0 -0
  61. data/docs/images/macFFBgHack.png +0 -0
  62. data/docs/images/package.png +0 -0
  63. data/docs/images/page_green.png +0 -0
  64. data/docs/images/page_white_text.png +0 -0
  65. data/docs/images/page_white_width.png +0 -0
  66. data/docs/images/plugin.png +0 -0
  67. data/docs/images/ruby.png +0 -0
  68. data/docs/images/tag_blue.png +0 -0
  69. data/docs/images/tag_green.png +0 -0
  70. data/docs/images/transparent.png +0 -0
  71. data/docs/images/wrench.png +0 -0
  72. data/docs/images/wrench_orange.png +0 -0
  73. data/docs/images/zoom.png +0 -0
  74. data/docs/index.html +91 -0
  75. data/docs/js/darkfish.js +97 -0
  76. data/docs/js/navigation.js +105 -0
  77. data/docs/js/navigation.js.gz +0 -0
  78. data/docs/js/search.js +110 -0
  79. data/docs/js/search_index.js +1 -0
  80. data/docs/js/search_index.js.gz +0 -0
  81. data/docs/js/searcher.js +229 -0
  82. data/docs/js/searcher.js.gz +0 -0
  83. data/docs/table_of_contents.html +184 -0
  84. data/lib/generators/loggable_activity/install_generator.rb +2 -1
  85. data/lib/generators/loggable_activity/templates/current_user.rb +1 -1
  86. data/lib/generators/loggable_activity/templates/loggable_activity.yml +29 -0
  87. data/lib/loggable_activity/activity.rb +208 -59
  88. data/lib/loggable_activity/configuration.rb +18 -0
  89. data/lib/loggable_activity/encryption.rb +20 -1
  90. data/lib/loggable_activity/encryption_key.rb +81 -14
  91. data/lib/loggable_activity/hooks.rb +10 -7
  92. data/lib/loggable_activity/payload.rb +45 -11
  93. data/lib/loggable_activity/payloads_builder.rb +50 -4
  94. data/lib/loggable_activity/update_payloads_builder.rb +64 -2
  95. data/lib/loggable_activity/version.rb +1 -1
  96. metadata +82 -10
  97. data/.DS_Store +0 -0
  98. data/loggable_activity-0.1.32.gem +0 -0
  99. data/loggable_activity-0.1.33.gem +0 -0
  100. data/loggable_activity-0.1.34.gem +0 -0
@@ -0,0 +1,227 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>CONSIDERTIONS - 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="file">
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
+ <div class="nav-section">
58
+ <h3>Table of Contents</h3>
59
+
60
+
61
+
62
+ <ul class="link-list" role="directory">
63
+ <li>
64
+ <details open>
65
+ <summary> <a href="#label-Considerations-2C+Work+in+progress.">Considerations, Work in progress.</a>
66
+ </summary>
67
+ <ul class="link-list" role="directory">
68
+ <li> <a href="#label-Protection+of+data+that+belongs+to+a+data+owner">Protection of data that belongs to a data owner</a>
69
+ <li> <a href="#label-Composition+of+data+in+a+log+entry">Composition of data in a log entry</a>
70
+ <li> <a href="#label-example+of+how+a+Loggable-3A-3AActivity+is+formatted+for+the+view">example of how a <code>Loggable::Activity</code> is formatted for the view</a>
71
+
72
+ </ul>
73
+ </details>
74
+ </li>
75
+
76
+ </ul>
77
+ </div>
78
+
79
+
80
+ <div id="project-metadata">
81
+
82
+ <div id="fileindex-section" class="nav-section">
83
+ <h3>Pages</h3>
84
+
85
+ <ul class="link-list">
86
+ <li><a href="./CHANGELOG_md.html">CHANGELOG</a>
87
+ <li><a href="./CODE_OF_CONDUCT_md.html">CODE_OF_CONDUCT</a>
88
+ <li><a href="./CONSIDERTIONS_md.html">CONSIDERTIONS</a>
89
+ <li><a href="./GETTING-STARTED_md.html">GETTING-STARTED</a>
90
+ <li><a href="./Gemfile.html">Gemfile</a>
91
+ <li><a href="./Gemfile_lock.html">Gemfile.lock</a>
92
+ <li><a href="./LICENSE_txt.html">LICENSE</a>
93
+ <li><a href="./README_md.html">README</a>
94
+ <li><a href="./ROADMAP_md.html">ROADMAP</a>
95
+ <li><a href="./Rakefile.html">Rakefile</a>
96
+ <li><a href="./bin/setup.html">setup</a>
97
+ <li><a href="./notes/CHEAT_SHEET_md.html">CHEAT_SHEET</a>
98
+ <li><a href="./sig/loggable_activity_rbs.html">loggable_activity.rbs</a>
99
+ </ul>
100
+ </div>
101
+
102
+ </div>
103
+ </nav>
104
+
105
+ <main role="main" aria-label="Page CONSIDERTIONS.md">
106
+
107
+ <h1 id="label-Considerations-2C+Work+in+progress.">Considerations, Work in progress.<span><a href="#label-Considerations-2C+Work+in+progress.">&para;</a> <a href="#top">&uarr;</a></span></h1>
108
+
109
+ <p>This document is stored here and might deleted&lt;br/&gt; &lt;br/&gt; It should be easy to configure and use the <em>LoggablActivity</em> without having to collect and format data all over the system.&lt;br/&gt; It should also be possible to delete a data owner and then all data related to that data owner should be inaccessible.</p>
110
+
111
+ <h3 id="label-Protection+of+data+that+belongs+to+a+data+owner">Protection of data that belongs to a data owner<span><a href="#label-Protection+of+data+that+belongs+to+a+data+owner">&para;</a> <a href="#top">&uarr;</a></span></h3>
112
+
113
+ <p>One way to protect data in a field is to encrypt it, when requested it can then be decrypted.&lt;br/&gt; If the data is required permanently deleted all there is to do is to throw away the key.&lt;br/&gt; Another way is to delete the content in all fields for a given data owner on request.&lt;br/&gt;</p>
114
+
115
+ <h3 id="label-Composition+of+data+in+a+log+entry">Composition of data in a log entry<span><a href="#label-Composition+of+data+in+a+log+entry">&para;</a> <a href="#top">&uarr;</a></span></h3>
116
+
117
+ <p>Lets consider an example with a user, the user has som personal information directly on the users DB Record. The user also has a relation to an address and the user might have a couple relations to other users, friends family members etc.&lt;br/&gt; All this is created from one form and when it is submitted we want to log it. One way of do it is to collect all the data from the DB and pack it into a json payload and submit it to the log, but then we have no control of&lt;br/&gt; What data is confidential and who it belongs to. So instead lets make some configurations for how data are handled. &lt;br/&gt;<em>Example</em></p>
118
+
119
+ <pre>┌──────────────────────┐ ┌──────────────────────┐
120
+ │ User │ ┌──▶│ Address │
121
+ ├──────────────────────┤ │ ├──────────────────────┤
122
+ │name: String │ │ │street: String │
123
+ ├──────────────────────┤ │ ├──────────────────────┤
124
+ │date_of_birth: Date │ │ │city: String │
125
+ ├──────────────────────┤ │ └──────────────────────┘
126
+ │address_id: Reference │──┘
127
+ ├──────────────────────┤
128
+ │system_task_uuid: UUID│
129
+ └──────────────────────┘
130
+
131
+
132
+ ╱│╲
133
+ ┌──────────────────────┐
134
+ │ Friend │
135
+ ├──────────────────────┤
136
+ │user_a_id: Reference │
137
+ ├──────────────────────┤
138
+ │user_b_id: Reference │
139
+ └──────────────────────┘</pre>
140
+
141
+ <p>Then a payload could look like this</p>
142
+
143
+ <pre>
144
+ {
145
+ user: {
146
+ name: Sting
147
+ date_of_birth &quot;October 2, 1951&quot;
148
+ address: {
149
+ street: &quot;some street&quot;,
150
+ city: &quot;London&quot;
151
+ },
152
+ friend: [
153
+ user: {
154
+ name: &quot;Bob&quot;
155
+ date_of_birth: &quot;September 01, 1991
156
+ }
157
+ ]
158
+ }
159
+ }</pre>
160
+
161
+ <p>But what about Bob, he is in the system and want to have control of his own data.&lt;br/&gt; To achieve this we need to organize the way we store log entries so owners can be identified even within a payload.</p>
162
+
163
+ <pre>┌────────────────────────┐
164
+ │ Activity │
165
+ ├────────────────────────┤
166
+ │key: String │
167
+ ├────────────────────────┤
168
+ │who_did_it_type: String │
169
+ ├────────────────────────┤
170
+ │who_did_it_id: UUID │
171
+ ├────────────────────────┤
172
+ │time: DateTime │
173
+ └────────────────────────┘
174
+
175
+
176
+
177
+ ╱│╲
178
+ ┌────────────────────────┐
179
+ │ Payload │
180
+ ├────────────────────────┤
181
+ │data: Json │
182
+ ├────────────────────────┤
183
+ │record_id: UUID │
184
+ ├────────────────────────┤
185
+ │record_type: String │
186
+ └────────────────────────┘</pre>
187
+
188
+ <p>So now we can control access to Bobs data in the Logging DB</p>
189
+
190
+ <h3 id="label-example+of+how+a+Loggable-3A-3AActivity+is+formatted+for+the+view">example of how a <code>Loggable::Activity</code> is formatted for the view<span><a href="#label-example+of+how+a+Loggable-3A-3AActivity+is+formatted+for+the+view">&para;</a> <a href="#top">&uarr;</a></span></h3>
191
+
192
+ <pre>activity = Loggable::Activity.lastest.last
193
+ activity.attrs ==&gt;
194
+
195
+ payloads: [
196
+ primary: {
197
+ name: &quot;User&quot;,
198
+ changes: {
199
+ attrs: {
200
+ first_name: {
201
+ from: &quot;Bob&quot;,
202
+ to: &quot;Rob&quot;
203
+ }
204
+ }
205
+ }
206
+ }
207
+ relations: [
208
+ name: &quot;Demo::Address
209
+ changes: {
210
+ street: {
211
+ from: &quot;5th Avenue&quot;,
212
+ to: &quot;Broadway&quot;
213
+ }
214
+ }
215
+ ]
216
+ ]</pre>
217
+
218
+ </main>
219
+
220
+
221
+
222
+ <footer id="validator-badges" role="contentinfo">
223
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
224
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.6.2.
225
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
226
+ </footer>
227
+
@@ -0,0 +1,144 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class CreateLoggableActivities - 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">ActiveRecord::Migration[6.1]
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-i-change">#change</a>
76
+ </ul>
77
+ </div>
78
+
79
+ </div>
80
+ </nav>
81
+
82
+ <main role="main" aria-labelledby="class-CreateLoggableActivities">
83
+ <h1 id="class-CreateLoggableActivities" class="class">
84
+ class CreateLoggableActivities
85
+ </h1>
86
+
87
+ <section class="description">
88
+
89
+ </section>
90
+
91
+ <section id="5Buntitled-5D" class="documentation-section">
92
+
93
+
94
+
95
+
96
+
97
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
98
+ <header>
99
+ <h3>Public Instance Methods</h3>
100
+ </header>
101
+
102
+ <div id="method-i-change" class="method-detail ">
103
+ <div class="method-header">
104
+ <div class="method-heading">
105
+ <span class="method-name">change</span><span
106
+ class="method-args">()</span>
107
+ <span class="method-click-advice">click to toggle source</span>
108
+ </div>
109
+ </div>
110
+
111
+ <div class="method-description">
112
+
113
+
114
+ <div class="method-source-code" id="change-source">
115
+ <pre><span class="ruby-comment"># File lib/generators/loggable_activity/templates/create_loggable_activities.rb, line 4</span>
116
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change</span>
117
+ <span class="ruby-identifier">create_table</span> <span class="ruby-value">:loggable_activities</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span>
118
+ <span class="ruby-identifier">t</span>.<span class="ruby-identifier">string</span> <span class="ruby-value">:action</span>
119
+ <span class="ruby-identifier">t</span>.<span class="ruby-identifier">references</span> <span class="ruby-value">:actor</span>, <span class="ruby-value">polymorphic:</span> <span class="ruby-keyword">true</span>, <span class="ruby-value">null:</span> <span class="ruby-keyword">true</span>
120
+ <span class="ruby-identifier">t</span>.<span class="ruby-identifier">string</span> <span class="ruby-value">:encrypted_actor_display_name</span>
121
+ <span class="ruby-identifier">t</span>.<span class="ruby-identifier">string</span> <span class="ruby-value">:encrypted_record_display_name</span>
122
+ <span class="ruby-identifier">t</span>.<span class="ruby-identifier">references</span> <span class="ruby-value">:record</span>, <span class="ruby-value">polymorphic:</span> <span class="ruby-keyword">true</span>, <span class="ruby-value">null:</span> <span class="ruby-keyword">true</span>
123
+
124
+ <span class="ruby-identifier">t</span>.<span class="ruby-identifier">timestamps</span>
125
+ <span class="ruby-keyword">end</span>
126
+ <span class="ruby-keyword">end</span></pre>
127
+ </div>
128
+ </div>
129
+
130
+
131
+ </div>
132
+
133
+ </section>
134
+
135
+ </section>
136
+ </main>
137
+
138
+
139
+ <footer id="validator-badges" role="contentinfo">
140
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
141
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.6.2.
142
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
143
+ </footer>
144
+
@@ -0,0 +1,140 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class CreateLoggableEncryptionKeys - 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">ActiveRecord::Migration[6.1]
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-i-change">#change</a>
76
+ </ul>
77
+ </div>
78
+
79
+ </div>
80
+ </nav>
81
+
82
+ <main role="main" aria-labelledby="class-CreateLoggableEncryptionKeys">
83
+ <h1 id="class-CreateLoggableEncryptionKeys" class="class">
84
+ class CreateLoggableEncryptionKeys
85
+ </h1>
86
+
87
+ <section class="description">
88
+
89
+ </section>
90
+
91
+ <section id="5Buntitled-5D" class="documentation-section">
92
+
93
+
94
+
95
+
96
+
97
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
98
+ <header>
99
+ <h3>Public Instance Methods</h3>
100
+ </header>
101
+
102
+ <div id="method-i-change" class="method-detail ">
103
+ <div class="method-header">
104
+ <div class="method-heading">
105
+ <span class="method-name">change</span><span
106
+ class="method-args">()</span>
107
+ <span class="method-click-advice">click to toggle source</span>
108
+ </div>
109
+ </div>
110
+
111
+ <div class="method-description">
112
+
113
+
114
+ <div class="method-source-code" id="change-source">
115
+ <pre><span class="ruby-comment"># File lib/generators/loggable_activity/templates/create_loggable_encryption_keys.rb, line 4</span>
116
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change</span>
117
+ <span class="ruby-identifier">create_table</span> <span class="ruby-value">:loggable_encryption_keys</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span>
118
+ <span class="ruby-identifier">t</span>.<span class="ruby-identifier">references</span> <span class="ruby-value">:parrent_key</span>, <span class="ruby-value">foreign_key:</span> { <span class="ruby-value">to_table:</span> <span class="ruby-string">&#39;loggable_encryption_keys&#39;</span>, <span class="ruby-value">on_delete:</span> <span class="ruby-value">:nullify</span> }
119
+ <span class="ruby-identifier">t</span>.<span class="ruby-identifier">string</span> <span class="ruby-value">:key</span>
120
+ <span class="ruby-identifier">t</span>.<span class="ruby-identifier">references</span> <span class="ruby-value">:record</span>, <span class="ruby-value">polymorphic:</span> <span class="ruby-keyword">true</span>, <span class="ruby-value">on_delete:</span> <span class="ruby-value">:nullify</span>
121
+ <span class="ruby-keyword">end</span>
122
+ <span class="ruby-keyword">end</span></pre>
123
+ </div>
124
+ </div>
125
+
126
+
127
+ </div>
128
+
129
+ </section>
130
+
131
+ </section>
132
+ </main>
133
+
134
+
135
+ <footer id="validator-badges" role="contentinfo">
136
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
137
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.6.2.
138
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
139
+ </footer>
140
+
@@ -0,0 +1,144 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta charset="UTF-8">
6
+
7
+ <title>class CreateLoggablePayloads - 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">ActiveRecord::Migration[6.1]
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-i-change">#change</a>
76
+ </ul>
77
+ </div>
78
+
79
+ </div>
80
+ </nav>
81
+
82
+ <main role="main" aria-labelledby="class-CreateLoggablePayloads">
83
+ <h1 id="class-CreateLoggablePayloads" class="class">
84
+ class CreateLoggablePayloads
85
+ </h1>
86
+
87
+ <section class="description">
88
+
89
+ </section>
90
+
91
+ <section id="5Buntitled-5D" class="documentation-section">
92
+
93
+
94
+
95
+
96
+
97
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section">
98
+ <header>
99
+ <h3>Public Instance Methods</h3>
100
+ </header>
101
+
102
+ <div id="method-i-change" class="method-detail ">
103
+ <div class="method-header">
104
+ <div class="method-heading">
105
+ <span class="method-name">change</span><span
106
+ class="method-args">()</span>
107
+ <span class="method-click-advice">click to toggle source</span>
108
+ </div>
109
+ </div>
110
+
111
+ <div class="method-description">
112
+
113
+
114
+ <div class="method-source-code" id="change-source">
115
+ <pre><span class="ruby-comment"># File lib/generators/loggable_activity/templates/create_loggable_payloads.rb, line 4</span>
116
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">change</span>
117
+ <span class="ruby-identifier">create_table</span> <span class="ruby-value">:loggable_payloads</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span>
118
+ <span class="ruby-identifier">t</span>.<span class="ruby-identifier">references</span> <span class="ruby-value">:record</span>, <span class="ruby-value">polymorphic:</span> <span class="ruby-keyword">true</span>, <span class="ruby-value">null:</span> <span class="ruby-keyword">true</span>
119
+ <span class="ruby-identifier">t</span>.<span class="ruby-identifier">json</span> <span class="ruby-value">:encrypted_attrs</span>
120
+ <span class="ruby-identifier">t</span>.<span class="ruby-identifier">integer</span> <span class="ruby-value">:payload_type</span>, <span class="ruby-value">default:</span> <span class="ruby-value">0</span>
121
+ <span class="ruby-identifier">t</span>.<span class="ruby-identifier">boolean</span> <span class="ruby-value">:data_owner</span>, <span class="ruby-value">default:</span> <span class="ruby-keyword">false</span>
122
+ <span class="ruby-identifier">t</span>.<span class="ruby-identifier">references</span> <span class="ruby-value">:activity</span>, <span class="ruby-value">foreign_key:</span> { <span class="ruby-value">to_table:</span> <span class="ruby-string">&#39;loggable_activities&#39;</span>, <span class="ruby-value">class_name:</span> <span class="ruby-string">&#39;LoggableActivity::Activity&#39;</span> }
123
+
124
+ <span class="ruby-identifier">t</span>.<span class="ruby-identifier">timestamps</span>
125
+ <span class="ruby-keyword">end</span>
126
+ <span class="ruby-keyword">end</span></pre>
127
+ </div>
128
+ </div>
129
+
130
+
131
+ </div>
132
+
133
+ </section>
134
+
135
+ </section>
136
+ </main>
137
+
138
+
139
+ <footer id="validator-badges" role="contentinfo">
140
+ <p><a href="https://validator.w3.org/check/referer">Validate</a>
141
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.6.2.
142
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
143
+ </footer>
144
+