record_history 0.0.2 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.yardoc/checksums CHANGED
@@ -1,4 +1,7 @@
1
- lib/record_history.rb 9e9f54bec98f9af93f7705af3030af09197169a9
2
- lib/record_history/version.rb 7d6308d8b42ce82874c565499ca49b93332888df
1
+ lib/record_history.rb 611a437d8b24383c5c0c2546729781adbcd6ab27
2
+ lib/record_history/version.rb 90e089b872acdf89e213c185bf2af8d517cabe35
3
+ lib/record_history/controller.rb 759fdb6a2032b34f4d56c4de974397b20934eb65
4
+ lib/record_history/has_record_history.rb 754a5875d888c55f59ca779ff65041e9728c8b74
5
+ lib/record_history/record_history_model.rb 04e5724250f9a4730fbbfabd2afdeedc29f6f23f
3
6
  lib/generators/record_history/install_generator.rb c6b047fa8ee8c9d27fb9b89fca0e59f4703df978
4
- lib/generators/record_history/templates/create_record_histories.rb 55a6577f127614215f0d3155ff86f394d689d32b
7
+ lib/generators/record_history/templates/create_record_histories.rb bb95e4efa19a3f60c9b37a8c876a948db7fac35b
Binary file
data/.yardoc/proxy_types CHANGED
Binary file
data/Gemfile CHANGED
@@ -2,3 +2,6 @@ source "http://rubygems.org"
2
2
 
3
3
  # Specify your gem's dependencies in record_history.gemspec
4
4
  gemspec
5
+ gem "rspec-rails"
6
+ gem "shoulda-matchers"
7
+ gem "rspec-set"
data/Gemfile.lock CHANGED
@@ -1,18 +1,103 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- record_history (0.0.1)
4
+ record_history (0.0.2)
5
+ activemodel
6
+ activerecord
7
+ activesupport
5
8
 
6
9
  GEM
7
10
  remote: http://rubygems.org/
8
11
  specs:
12
+ actionpack (3.2.1)
13
+ activemodel (= 3.2.1)
14
+ activesupport (= 3.2.1)
15
+ builder (~> 3.0.0)
16
+ erubis (~> 2.7.0)
17
+ journey (~> 1.0.1)
18
+ rack (~> 1.4.0)
19
+ rack-cache (~> 1.1)
20
+ rack-test (~> 0.6.1)
21
+ sprockets (~> 2.1.2)
22
+ activemodel (3.2.1)
23
+ activesupport (= 3.2.1)
24
+ builder (~> 3.0.0)
25
+ activerecord (3.2.1)
26
+ activemodel (= 3.2.1)
27
+ activesupport (= 3.2.1)
28
+ arel (~> 3.0.0)
29
+ tzinfo (~> 0.3.29)
30
+ activesupport (3.2.1)
31
+ i18n (~> 0.6)
32
+ multi_json (~> 1.0)
33
+ arel (3.0.2)
34
+ builder (3.0.0)
35
+ diff-lcs (1.1.3)
36
+ erubis (2.7.0)
37
+ factory_girl (2.6.0)
38
+ activesupport (>= 2.3.9)
39
+ faker (1.0.1)
40
+ i18n (~> 0.4)
41
+ hike (1.2.1)
42
+ i18n (0.6.0)
43
+ journey (1.0.3)
44
+ json (1.6.5)
45
+ multi_json (1.1.0)
46
+ rack (1.4.1)
47
+ rack-cache (1.1)
48
+ rack (>= 0.4)
49
+ rack-ssl (1.3.2)
50
+ rack
51
+ rack-test (0.6.1)
52
+ rack (>= 1.0)
53
+ railties (3.2.1)
54
+ actionpack (= 3.2.1)
55
+ activesupport (= 3.2.1)
56
+ rack-ssl (~> 1.3.2)
57
+ rake (>= 0.8.7)
58
+ rdoc (~> 3.4)
59
+ thor (~> 0.14.6)
60
+ rake (0.9.2.2)
61
+ rdoc (3.12)
62
+ json (~> 1.4)
9
63
  redcarpet (1.17.2)
64
+ rspec (2.8.0)
65
+ rspec-core (~> 2.8.0)
66
+ rspec-expectations (~> 2.8.0)
67
+ rspec-mocks (~> 2.8.0)
68
+ rspec-core (2.8.0)
69
+ rspec-expectations (2.8.0)
70
+ diff-lcs (~> 1.1.2)
71
+ rspec-mocks (2.8.0)
72
+ rspec-rails (2.8.1)
73
+ actionpack (>= 3.0)
74
+ activesupport (>= 3.0)
75
+ railties (>= 3.0)
76
+ rspec (~> 2.8.0)
77
+ rspec-set (0.0.1)
78
+ rspec (>= 2)
79
+ shoulda-matchers (1.0.0)
80
+ sprockets (2.1.2)
81
+ hike (~> 1.2)
82
+ rack (~> 1.0)
83
+ tilt (~> 1.1, != 1.3.0)
84
+ sqlite3 (1.3.5)
85
+ thor (0.14.6)
86
+ tilt (1.3.3)
87
+ tzinfo (0.3.31)
10
88
  yard (0.7.5)
11
89
 
12
90
  PLATFORMS
13
91
  ruby
14
92
 
15
93
  DEPENDENCIES
94
+ factory_girl
95
+ faker
16
96
  record_history!
17
97
  redcarpet (~> 1.17)
98
+ rspec
99
+ rspec-rails
100
+ rspec-set
101
+ shoulda-matchers
102
+ sqlite3
18
103
  yard (~> 0.7.5)
data/Rakefile CHANGED
@@ -1,5 +1,20 @@
1
1
  require "bundler/gem_tasks"
2
+ require 'bundler'
3
+ require 'rubygems'
4
+ require 'rake'
5
+ require 'rspec/core/rake_task'
6
+ require 'factory_girl'
2
7
 
3
8
  require 'yard'
4
9
  YARD::Rake::YardocTask.new
5
10
 
11
+ namespace :spec do
12
+ desc "Run unit specs"
13
+ RSpec::Core::RakeTask.new('unit') do |t|
14
+ t.pattern = 'spec/*_spec.rb'
15
+ end
16
+ end
17
+
18
+ desc "Run the unit and acceptance specs"
19
+ task :spec => ['spec:unit']
20
+
@@ -174,17 +174,15 @@
174
174
  <pre class="lines">
175
175
 
176
176
 
177
- 14
178
- 15
179
- 16
180
- 17</pre>
177
+ 18
178
+ 19
179
+ 20</pre>
181
180
  </td>
182
181
  <td>
183
- <pre class="code"><span class="info file"># File 'lib/generators/record_history/templates/create_record_histories.rb', line 14</span>
182
+ <pre class="code"><span class="info file"># File 'lib/generators/record_history/templates/create_record_histories.rb', line 18</span>
184
183
 
185
184
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_down'>down</span>
186
- <span class='id identifier rubyid_remove_index'>remove_index</span> <span class='symbol'>:versions</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='symbol'>:item_type</span><span class='comma'>,</span> <span class='symbol'>:item_id</span><span class='rbracket'>]</span>
187
- <span class='id identifier rubyid_drop_table'>drop_table</span> <span class='symbol'>:versions</span>
185
+ <span class='id identifier rubyid_drop_table'>drop_table</span> <span class='symbol'>:record_histories</span>
188
186
  <span class='kw'>end</span></pre>
189
187
  </td>
190
188
  </tr>
@@ -214,21 +212,29 @@
214
212
  9
215
213
  10
216
214
  11
217
- 12</pre>
215
+ 12
216
+ 13
217
+ 14
218
+ 15
219
+ 16</pre>
218
220
  </td>
219
221
  <td>
220
222
  <pre class="code"><span class="info file"># File 'lib/generators/record_history/templates/create_record_histories.rb', line 2</span>
221
223
 
222
224
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_up'>up</span>
223
225
  <span class='id identifier rubyid_create_table'>create_table</span> <span class='symbol'>:record_histories</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_t'>t</span><span class='op'>|</span>
224
- <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span> <span class='symbol'>:target_type</span><span class='comma'>,</span> <span class='symbol'>:null</span> <span class='op'>=&gt;</span> <span class='kw'>false</span>
225
- <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_integer'>integer</span> <span class='symbol'>:target_id</span><span class='comma'>,</span> <span class='symbol'>:null</span> <span class='op'>=&gt;</span> <span class='kw'>false</span>
226
+ <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span> <span class='symbol'>:item_type</span><span class='comma'>,</span> <span class='symbol'>:null</span> <span class='op'>=&gt;</span> <span class='kw'>false</span>
227
+ <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_integer'>integer</span> <span class='symbol'>:item_id</span><span class='comma'>,</span> <span class='symbol'>:null</span> <span class='op'>=&gt;</span> <span class='kw'>false</span>
226
228
  <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span> <span class='symbol'>:attr_name</span><span class='comma'>,</span> <span class='symbol'>:null</span> <span class='op'>=&gt;</span> <span class='kw'>false</span>
229
+ <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span> <span class='symbol'>:old_value_dump</span><span class='comma'>,</span> <span class='symbol'>:null</span> <span class='op'>=&gt;</span> <span class='kw'>false</span>
230
+ <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span> <span class='symbol'>:new_value_dump</span><span class='comma'>,</span> <span class='symbol'>:null</span> <span class='op'>=&gt;</span> <span class='kw'>false</span>
231
+ <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_string'>string</span> <span class='symbol'>:author_type</span>
227
232
  <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_integer'>integer</span> <span class='symbol'>:author_id</span>
228
- <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span> <span class='symbol'>:object</span>
229
- <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_datetime'>datetime</span> <span class='symbol'>:created_at</span>
233
+ <span class='id identifier rubyid_t'>t</span><span class='period'>.</span><span class='id identifier rubyid_datetime'>datetime</span> <span class='symbol'>:created_at</span>
230
234
  <span class='kw'>end</span>
231
- <span class='id identifier rubyid_add_index'>add_index</span> <span class='symbol'>:versions</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='symbol'>:item_type</span><span class='comma'>,</span> <span class='symbol'>:item_id</span><span class='rbracket'>]</span>
235
+ <span class='id identifier rubyid_add_index'>add_index</span> <span class='symbol'>:record_histories</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='symbol'>:item_type</span><span class='comma'>,</span> <span class='symbol'>:item_id</span><span class='comma'>,</span> <span class='symbol'>:attr_name</span><span class='rbracket'>]</span>
236
+ <span class='id identifier rubyid_add_index'>add_index</span> <span class='symbol'>:record_histories</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='symbol'>:item_type</span><span class='comma'>,</span> <span class='symbol'>:item_id</span><span class='rbracket'>]</span>
237
+ <span class='id identifier rubyid_add_index'>add_index</span> <span class='symbol'>:record_histories</span><span class='comma'>,</span> <span class='lbracket'>[</span><span class='symbol'>:author_type</span><span class='comma'>,</span> <span class='symbol'>:author_id</span><span class='rbracket'>]</span>
232
238
  <span class='kw'>end</span></pre>
233
239
  </td>
234
240
  </tr>
@@ -240,7 +246,7 @@
240
246
  </div>
241
247
 
242
248
  <div id="footer">
243
- Generated on Tue Feb 21 13:39:16 2012 by
249
+ Generated on Fri Feb 24 12:04:59 2012 by
244
250
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
245
251
  0.7.5 (ruby-1.9.3).
246
252
  </div>
@@ -0,0 +1,164 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: RecordHistory::Controller
8
+
9
+ &mdash; Documentation by YARD 0.7.5
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ relpath = '..';
19
+ if (relpath != '') relpath += '/';
20
+ </script>
21
+
22
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
25
+
26
+
27
+ </head>
28
+ <body>
29
+ <script type="text/javascript" charset="utf-8">
30
+ if (window.top.frames.main) document.body.className = 'frames';
31
+ </script>
32
+
33
+ <div id="header">
34
+ <div id="menu">
35
+
36
+ <a href="../_index.html">Index (C)</a> &raquo;
37
+ <span class='title'><span class='object_link'><a href="../RecordHistory.html" title="RecordHistory (module)">RecordHistory</a></span></span>
38
+ &raquo;
39
+ <span class="title">Controller</span>
40
+
41
+
42
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
+ </div>
44
+
45
+ <div id="search">
46
+
47
+ <a id="class_list_link" href="#">Class List</a>
48
+
49
+ <a id="method_list_link" href="#">Method List</a>
50
+
51
+ <a id="file_list_link" href="#">File List</a>
52
+
53
+ </div>
54
+ <div class="clear"></div>
55
+ </div>
56
+
57
+ <iframe id="search_frame"></iframe>
58
+
59
+ <div id="content"><h1>Module: RecordHistory::Controller
60
+
61
+
62
+
63
+ </h1>
64
+
65
+ <dl class="box">
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+ <dt class="r1 last">Defined in:</dt>
75
+ <dd class="r1 last">lib/record_history/controller.rb</dd>
76
+
77
+ </dl>
78
+ <div class="clear"></div>
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+ <h2>
89
+ Class Method Summary
90
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
91
+ </h2>
92
+
93
+ <ul class="summary">
94
+
95
+ <li class="public ">
96
+ <span class="summary_signature">
97
+
98
+ <a href="#included-class_method" title="included (class method)">+ (Object) <strong>included</strong>(base) </a>
99
+
100
+
101
+
102
+ </span>
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+ <span class="summary_desc"><div class='inline'></div></span>
112
+
113
+ </li>
114
+
115
+
116
+ </ul>
117
+
118
+
119
+
120
+
121
+ <div id="class_method_details" class="method_details_list">
122
+ <h2>Class Method Details</h2>
123
+
124
+
125
+ <div class="method_details first">
126
+ <p class="signature first" id="included-class_method">
127
+
128
+ + (<tt>Object</tt>) <strong>included</strong>(base)
129
+
130
+
131
+
132
+ </p><table class="source_code">
133
+ <tr>
134
+ <td>
135
+ <pre class="lines">
136
+
137
+
138
+ 3
139
+ 4
140
+ 5</pre>
141
+ </td>
142
+ <td>
143
+ <pre class="code"><span class="info file"># File 'lib/record_history/controller.rb', line 3</span>
144
+
145
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_included'>included</span><span class='lparen'>(</span><span class='id identifier rubyid_base'>base</span><span class='rparen'>)</span>
146
+ <span class='id identifier rubyid_base'>base</span><span class='period'>.</span><span class='id identifier rubyid_before_filter'>before_filter</span> <span class='symbol'>:set_record_history_author</span>
147
+ <span class='kw'>end</span></pre>
148
+ </td>
149
+ </tr>
150
+ </table>
151
+ </div>
152
+
153
+ </div>
154
+
155
+ </div>
156
+
157
+ <div id="footer">
158
+ Generated on Fri Feb 24 12:04:59 2012 by
159
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
160
+ 0.7.5 (ruby-1.9.3).
161
+ </div>
162
+
163
+ </body>
164
+ </html>
@@ -183,7 +183,7 @@
183
183
  </div>
184
184
 
185
185
  <div id="footer">
186
- Generated on Tue Feb 21 13:39:16 2012 by
186
+ Generated on Fri Feb 24 12:04:59 2012 by
187
187
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
188
188
  0.7.5 (ruby-1.9.3).
189
189
  </div>
@@ -0,0 +1,251 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+ <title>
7
+ Module: RecordHistory::Model::ClassMethods
8
+
9
+ &mdash; Documentation by YARD 0.7.5
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ relpath = '../..';
19
+ if (relpath != '') relpath += '/';
20
+ </script>
21
+
22
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
25
+
26
+
27
+ </head>
28
+ <body>
29
+ <script type="text/javascript" charset="utf-8">
30
+ if (window.top.frames.main) document.body.className = 'frames';
31
+ </script>
32
+
33
+ <div id="header">
34
+ <div id="menu">
35
+
36
+ <a href="../../_index.html">Index (C)</a> &raquo;
37
+ <span class='title'><span class='object_link'><a href="../../RecordHistory.html" title="RecordHistory (module)">RecordHistory</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Model.html" title="RecordHistory::Model (module)">Model</a></span></span>
38
+ &raquo;
39
+ <span class="title">ClassMethods</span>
40
+
41
+
42
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
43
+ </div>
44
+
45
+ <div id="search">
46
+
47
+ <a id="class_list_link" href="#">Class List</a>
48
+
49
+ <a id="method_list_link" href="#">Method List</a>
50
+
51
+ <a id="file_list_link" href="#">File List</a>
52
+
53
+ </div>
54
+ <div class="clear"></div>
55
+ </div>
56
+
57
+ <iframe id="search_frame"></iframe>
58
+
59
+ <div id="content"><h1>Module: RecordHistory::Model::ClassMethods
60
+
61
+
62
+
63
+ </h1>
64
+
65
+ <dl class="box">
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+ <dt class="r1 last">Defined in:</dt>
75
+ <dd class="r1 last">lib/record_history/has_record_history.rb</dd>
76
+
77
+ </dl>
78
+ <div class="clear"></div>
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+ <h2>
89
+ Instance Method Summary
90
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
91
+ </h2>
92
+
93
+ <ul class="summary">
94
+
95
+ <li class="public ">
96
+ <span class="summary_signature">
97
+
98
+ <a href="#has_record_history-instance_method" title="#has_record_history (instance method)">- (Object) <strong>has_record_history</strong>(options = {}) </a>
99
+
100
+
101
+
102
+ </span>
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+ <span class="summary_desc"><div class='inline'></div></span>
112
+
113
+ </li>
114
+
115
+
116
+ <li class="public ">
117
+ <span class="summary_signature">
118
+
119
+ <a href="#is_record_history_author-instance_method" title="#is_record_history_author (instance method)">- (Object) <strong>is_record_history_author</strong>(options = {}) </a>
120
+
121
+
122
+
123
+ </span>
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+ <span class="summary_desc"><div class='inline'></div></span>
133
+
134
+ </li>
135
+
136
+
137
+ </ul>
138
+
139
+
140
+
141
+
142
+ <div id="instance_method_details" class="method_details_list">
143
+ <h2>Instance Method Details</h2>
144
+
145
+
146
+ <div class="method_details first">
147
+ <p class="signature first" id="has_record_history-instance_method">
148
+
149
+ - (<tt>Object</tt>) <strong>has_record_history</strong>(options = {})
150
+
151
+
152
+
153
+ </p><table class="source_code">
154
+ <tr>
155
+ <td>
156
+ <pre class="lines">
157
+
158
+
159
+ 9
160
+ 10
161
+ 11
162
+ 12
163
+ 13
164
+ 14
165
+ 15
166
+ 16
167
+ 17
168
+ 18
169
+ 19
170
+ 20
171
+ 21
172
+ 22
173
+ 23
174
+ 24
175
+ 25
176
+ 26
177
+ 27</pre>
178
+ </td>
179
+ <td>
180
+ <pre class="code"><span class="info file"># File 'lib/record_history/has_record_history.rb', line 9</span>
181
+
182
+ <span class='kw'>def</span> <span class='id identifier rubyid_has_record_history'>has_record_history</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
183
+ <span class='id identifier rubyid_send'>send</span> <span class='symbol'>:include</span><span class='comma'>,</span> <span class='const'>InstanceMethods</span>
184
+
185
+ <span class='id identifier rubyid_attr_accessor'>attr_accessor</span> <span class='symbol'>:record_history_obj</span>
186
+
187
+ <span class='id identifier rubyid_class_attribute'>class_attribute</span> <span class='symbol'>:record_history_ignore</span>
188
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_record_history_ignore'>record_history_ignore</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='lbracket'>[</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:ignore</span><span class='rbracket'>]</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span> <span class='op'>||</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_attr'>attr</span><span class='op'>|</span> <span class='id identifier rubyid_attr'>attr</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbrace'>}</span>
189
+
190
+ <span class='id identifier rubyid_class_attribute'>class_attribute</span> <span class='symbol'>:record_history_only</span>
191
+ <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_record_history_only'>record_history_only</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='lbracket'>[</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:only</span><span class='rbracket'>]</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span> <span class='op'>||</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_attr'>attr</span><span class='op'>|</span> <span class='id identifier rubyid_attr'>attr</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbrace'>}</span>
192
+
193
+ <span class='id identifier rubyid_has_many'>has_many</span> <span class='symbol'>:record_history</span><span class='comma'>,</span>
194
+ <span class='symbol'>:class_name</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>RecordHistoryModel</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
195
+ <span class='symbol'>:order</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>created_at DESC</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
196
+ <span class='symbol'>:as</span> <span class='op'>=&gt;</span> <span class='symbol'>:item</span>
197
+
198
+ <span class='id identifier rubyid_before_save'>before_save</span> <span class='symbol'>:build_record_history_obj</span>
199
+ <span class='id identifier rubyid_after_save'>after_save</span> <span class='symbol'>:save_record_history_obj</span>
200
+ <span class='kw'>end</span></pre>
201
+ </td>
202
+ </tr>
203
+ </table>
204
+ </div>
205
+
206
+ <div class="method_details ">
207
+ <p class="signature " id="is_record_history_author-instance_method">
208
+
209
+ - (<tt>Object</tt>) <strong>is_record_history_author</strong>(options = {})
210
+
211
+
212
+
213
+ </p><table class="source_code">
214
+ <tr>
215
+ <td>
216
+ <pre class="lines">
217
+
218
+
219
+ 29
220
+ 30
221
+ 31
222
+ 32
223
+ 33
224
+ 34</pre>
225
+ </td>
226
+ <td>
227
+ <pre class="code"><span class="info file"># File 'lib/record_history/has_record_history.rb', line 29</span>
228
+
229
+ <span class='kw'>def</span> <span class='id identifier rubyid_is_record_history_author'>is_record_history_author</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
230
+ <span class='id identifier rubyid_has_many'>has_many</span> <span class='symbol'>:history</span><span class='comma'>,</span>
231
+ <span class='symbol'>:class_name</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>RecordHistoryModel</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
232
+ <span class='symbol'>:order</span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>created_at DESC</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
233
+ <span class='symbol'>:as</span> <span class='op'>=&gt;</span> <span class='symbol'>:author</span>
234
+ <span class='kw'>end</span></pre>
235
+ </td>
236
+ </tr>
237
+ </table>
238
+ </div>
239
+
240
+ </div>
241
+
242
+ </div>
243
+
244
+ <div id="footer">
245
+ Generated on Fri Feb 24 12:04:59 2012 by
246
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
247
+ 0.7.5 (ruby-1.9.3).
248
+ </div>
249
+
250
+ </body>
251
+ </html>