validation_issues 0.0.3 → 0.0.4

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.
@@ -0,0 +1,373 @@
1
+ (function($, undefined) {
2
+
3
+ /**
4
+ * Unobtrusive scripting adapter for jQuery
5
+ *
6
+ * Requires jQuery 1.6.0 or later.
7
+ * https://github.com/rails/jquery-ujs
8
+
9
+ * Uploading file using rails.js
10
+ * =============================
11
+ *
12
+ * By default, browsers do not allow files to be uploaded via AJAX. As a result, if there are any non-blank file fields
13
+ * in the remote form, this adapter aborts the AJAX submission and allows the form to submit through standard means.
14
+ *
15
+ * The `ajax:aborted:file` event allows you to bind your own handler to process the form submission however you wish.
16
+ *
17
+ * Ex:
18
+ * $('form').live('ajax:aborted:file', function(event, elements){
19
+ * // Implement own remote file-transfer handler here for non-blank file inputs passed in `elements`.
20
+ * // Returning false in this handler tells rails.js to disallow standard form submission
21
+ * return false;
22
+ * });
23
+ *
24
+ * The `ajax:aborted:file` event is fired when a file-type input is detected with a non-blank value.
25
+ *
26
+ * Third-party tools can use this hook to detect when an AJAX file upload is attempted, and then use
27
+ * techniques like the iframe method to upload the file instead.
28
+ *
29
+ * Required fields in rails.js
30
+ * ===========================
31
+ *
32
+ * If any blank required inputs (required="required") are detected in the remote form, the whole form submission
33
+ * is canceled. Note that this is unlike file inputs, which still allow standard (non-AJAX) form submission.
34
+ *
35
+ * The `ajax:aborted:required` event allows you to bind your own handler to inform the user of blank required inputs.
36
+ *
37
+ * !! Note that Opera does not fire the form's submit event if there are blank required inputs, so this event may never
38
+ * get fired in Opera. This event is what causes other browsers to exhibit the same submit-aborting behavior.
39
+ *
40
+ * Ex:
41
+ * $('form').live('ajax:aborted:required', function(event, elements){
42
+ * // Returning false in this handler tells rails.js to submit the form anyway.
43
+ * // The blank required inputs are passed to this function in `elements`.
44
+ * return ! confirm("Would you like to submit the form with missing info?");
45
+ * });
46
+ */
47
+
48
+ // Shorthand to make it a little easier to call public rails functions from within rails.js
49
+ var rails;
50
+
51
+ $.rails = rails = {
52
+ // Link elements bound by jquery-ujs
53
+ linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote], a[data-disable-with]',
54
+
55
+ // Select elements bound by jquery-ujs
56
+ inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',
57
+
58
+ // Form elements bound by jquery-ujs
59
+ formSubmitSelector: 'form',
60
+
61
+ // Form input elements bound by jquery-ujs
62
+ formInputClickSelector: 'form input[type=submit], form input[type=image], form button[type=submit], form button:not(button[type])',
63
+
64
+ // Form input elements disabled during form submission
65
+ disableSelector: 'input[data-disable-with], button[data-disable-with], textarea[data-disable-with]',
66
+
67
+ // Form input elements re-enabled after form submission
68
+ enableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled',
69
+
70
+ // Form required input elements
71
+ requiredInputSelector: 'input[name][required]:not([disabled]),textarea[name][required]:not([disabled])',
72
+
73
+ // Form file input elements
74
+ fileInputSelector: 'input:file',
75
+
76
+ // Link onClick disable selector with possible reenable after remote submission
77
+ linkDisableSelector: 'a[data-disable-with]',
78
+
79
+ // Make sure that every Ajax request sends the CSRF token
80
+ CSRFProtection: function(xhr) {
81
+ var token = $('meta[name="csrf-token"]').attr('content');
82
+ if (token) xhr.setRequestHeader('X-CSRF-Token', token);
83
+ },
84
+
85
+ // Triggers an event on an element and returns false if the event result is false
86
+ fire: function(obj, name, data) {
87
+ var event = $.Event(name);
88
+ obj.trigger(event, data);
89
+ return event.result !== false;
90
+ },
91
+
92
+ // Default confirm dialog, may be overridden with custom confirm dialog in $.rails.confirm
93
+ confirm: function(message) {
94
+ return confirm(message);
95
+ },
96
+
97
+ // Default ajax function, may be overridden with custom function in $.rails.ajax
98
+ ajax: function(options) {
99
+ return $.ajax(options);
100
+ },
101
+
102
+ // Submits "remote" forms and links with ajax
103
+ handleRemote: function(element) {
104
+ var method, url, data,
105
+ crossDomain = element.data('cross-domain') || null,
106
+ dataType = element.data('type') || ($.ajaxSettings && $.ajaxSettings.dataType),
107
+ options;
108
+
109
+ if (rails.fire(element, 'ajax:before')) {
110
+
111
+ if (element.is('form')) {
112
+ method = element.attr('method');
113
+ url = element.attr('action');
114
+ data = element.serializeArray();
115
+ // memoized value from clicked submit button
116
+ var button = element.data('ujs:submit-button');
117
+ if (button) {
118
+ data.push(button);
119
+ element.data('ujs:submit-button', null);
120
+ }
121
+ } else if (element.is(rails.inputChangeSelector)) {
122
+ method = element.data('method');
123
+ url = element.data('url');
124
+ data = element.serialize();
125
+ if (element.data('params')) data = data + "&" + element.data('params');
126
+ } else {
127
+ method = element.data('method');
128
+ url = element.attr('href');
129
+ data = element.data('params') || null;
130
+ }
131
+
132
+ options = {
133
+ type: method || 'GET', data: data, dataType: dataType, crossDomain: crossDomain,
134
+ // stopping the "ajax:beforeSend" event will cancel the ajax request
135
+ beforeSend: function(xhr, settings) {
136
+ if (settings.dataType === undefined) {
137
+ xhr.setRequestHeader('accept', '*/*;q=0.5, ' + settings.accepts.script);
138
+ }
139
+ return rails.fire(element, 'ajax:beforeSend', [xhr, settings]);
140
+ },
141
+ success: function(data, status, xhr) {
142
+ element.trigger('ajax:success', [data, status, xhr]);
143
+ },
144
+ complete: function(xhr, status) {
145
+ element.trigger('ajax:complete', [xhr, status]);
146
+ },
147
+ error: function(xhr, status, error) {
148
+ element.trigger('ajax:error', [xhr, status, error]);
149
+ }
150
+ };
151
+ // Only pass url to `ajax` options if not blank
152
+ if (url) { options.url = url; }
153
+
154
+ return rails.ajax(options);
155
+ } else {
156
+ return false;
157
+ }
158
+ },
159
+
160
+ // Handles "data-method" on links such as:
161
+ // <a href="/users/5" data-method="delete" rel="nofollow" data-confirm="Are you sure?">Delete</a>
162
+ handleMethod: function(link) {
163
+ var href = link.attr('href'),
164
+ method = link.data('method'),
165
+ target = link.attr('target'),
166
+ csrf_token = $('meta[name=csrf-token]').attr('content'),
167
+ csrf_param = $('meta[name=csrf-param]').attr('content'),
168
+ form = $('<form method="post" action="' + href + '"></form>'),
169
+ metadata_input = '<input name="_method" value="' + method + '" type="hidden" />';
170
+
171
+ if (csrf_param !== undefined && csrf_token !== undefined) {
172
+ metadata_input += '<input name="' + csrf_param + '" value="' + csrf_token + '" type="hidden" />';
173
+ }
174
+
175
+ if (target) { form.attr('target', target); }
176
+
177
+ form.hide().append(metadata_input).appendTo('body');
178
+ form.submit();
179
+ },
180
+
181
+ /* Disables form elements:
182
+ - Caches element value in 'ujs:enable-with' data store
183
+ - Replaces element text with value of 'data-disable-with' attribute
184
+ - Sets disabled property to true
185
+ */
186
+ disableFormElements: function(form) {
187
+ form.find(rails.disableSelector).each(function() {
188
+ var element = $(this), method = element.is('button') ? 'html' : 'val';
189
+ element.data('ujs:enable-with', element[method]());
190
+ element[method](element.data('disable-with'));
191
+ element.prop('disabled', true);
192
+ });
193
+ },
194
+
195
+ /* Re-enables disabled form elements:
196
+ - Replaces element text with cached value from 'ujs:enable-with' data store (created in `disableFormElements`)
197
+ - Sets disabled property to false
198
+ */
199
+ enableFormElements: function(form) {
200
+ form.find(rails.enableSelector).each(function() {
201
+ var element = $(this), method = element.is('button') ? 'html' : 'val';
202
+ if (element.data('ujs:enable-with')) element[method](element.data('ujs:enable-with'));
203
+ element.prop('disabled', false);
204
+ });
205
+ },
206
+
207
+ /* For 'data-confirm' attribute:
208
+ - Fires `confirm` event
209
+ - Shows the confirmation dialog
210
+ - Fires the `confirm:complete` event
211
+
212
+ Returns `true` if no function stops the chain and user chose yes; `false` otherwise.
213
+ Attaching a handler to the element's `confirm` event that returns a `falsy` value cancels the confirmation dialog.
214
+ Attaching a handler to the element's `confirm:complete` event that returns a `falsy` value makes this function
215
+ return false. The `confirm:complete` event is fired whether or not the user answered true or false to the dialog.
216
+ */
217
+ allowAction: function(element) {
218
+ var message = element.data('confirm'),
219
+ answer = false, callback;
220
+ if (!message) { return true; }
221
+
222
+ if (rails.fire(element, 'confirm')) {
223
+ answer = rails.confirm(message);
224
+ callback = rails.fire(element, 'confirm:complete', [answer]);
225
+ }
226
+ return answer && callback;
227
+ },
228
+
229
+ // Helper function which checks for blank inputs in a form that match the specified CSS selector
230
+ blankInputs: function(form, specifiedSelector, nonBlank) {
231
+ var inputs = $(), input,
232
+ selector = specifiedSelector || 'input,textarea';
233
+ form.find(selector).each(function() {
234
+ input = $(this);
235
+ // Collect non-blank inputs if nonBlank option is true, otherwise, collect blank inputs
236
+ if (nonBlank ? input.val() : !input.val()) {
237
+ inputs = inputs.add(input);
238
+ }
239
+ });
240
+ return inputs.length ? inputs : false;
241
+ },
242
+
243
+ // Helper function which checks for non-blank inputs in a form that match the specified CSS selector
244
+ nonBlankInputs: function(form, specifiedSelector) {
245
+ return rails.blankInputs(form, specifiedSelector, true); // true specifies nonBlank
246
+ },
247
+
248
+ // Helper function, needed to provide consistent behavior in IE
249
+ stopEverything: function(e) {
250
+ $(e.target).trigger('ujs:everythingStopped');
251
+ e.stopImmediatePropagation();
252
+ return false;
253
+ },
254
+
255
+ // find all the submit events directly bound to the form and
256
+ // manually invoke them. If anyone returns false then stop the loop
257
+ callFormSubmitBindings: function(form, event) {
258
+ var events = form.data('events'), continuePropagation = true;
259
+ if (events !== undefined && events['submit'] !== undefined) {
260
+ $.each(events['submit'], function(i, obj){
261
+ if (typeof obj.handler === 'function') return continuePropagation = obj.handler(event);
262
+ });
263
+ }
264
+ return continuePropagation;
265
+ },
266
+
267
+ // replace element's html with the 'data-disable-with' after storing original html
268
+ // and prevent clicking on it
269
+ disableElement: function(element) {
270
+ element.data('ujs:enable-with', element.html()); // store enabled state
271
+ element.html(element.data('disable-with')); // set to disabled state
272
+ element.bind('click.railsDisable', function(e) { // prevent further clicking
273
+ return rails.stopEverything(e)
274
+ });
275
+ },
276
+
277
+ // restore element to its original state which was disabled by 'disableElement' above
278
+ enableElement: function(element) {
279
+ if (element.data('ujs:enable-with') !== undefined) {
280
+ element.html(element.data('ujs:enable-with')); // set to old enabled state
281
+ // this should be element.removeData('ujs:enable-with')
282
+ // but, there is currently a bug in jquery which makes hyphenated data attributes not get removed
283
+ element.data('ujs:enable-with', false); // clean up cache
284
+ }
285
+ element.unbind('click.railsDisable'); // enable element
286
+ }
287
+
288
+ };
289
+
290
+ $.ajaxPrefilter(function(options, originalOptions, xhr){ if ( !options.crossDomain ) { rails.CSRFProtection(xhr); }});
291
+
292
+ $(document).delegate(rails.linkDisableSelector, 'ajax:complete', function() {
293
+ rails.enableElement($(this));
294
+ });
295
+
296
+ $(document).delegate(rails.linkClickSelector, 'click.rails', function(e) {
297
+ var link = $(this), method = link.data('method'), data = link.data('params');
298
+ if (!rails.allowAction(link)) return rails.stopEverything(e);
299
+
300
+ if (link.is(rails.linkDisableSelector)) rails.disableElement(link);
301
+
302
+ if (link.data('remote') !== undefined) {
303
+ if ( (e.metaKey || e.ctrlKey) && (!method || method === 'GET') && !data ) { return true; }
304
+
305
+ if (rails.handleRemote(link) === false) { rails.enableElement(link); }
306
+ return false;
307
+
308
+ } else if (link.data('method')) {
309
+ rails.handleMethod(link);
310
+ return false;
311
+ }
312
+ });
313
+
314
+ $(document).delegate(rails.inputChangeSelector, 'change.rails', function(e) {
315
+ var link = $(this);
316
+ if (!rails.allowAction(link)) return rails.stopEverything(e);
317
+
318
+ rails.handleRemote(link);
319
+ return false;
320
+ });
321
+
322
+ $(document).delegate(rails.formSubmitSelector, 'submit.rails', function(e) {
323
+ var form = $(this),
324
+ remote = form.data('remote') !== undefined,
325
+ blankRequiredInputs = rails.blankInputs(form, rails.requiredInputSelector),
326
+ nonBlankFileInputs = rails.nonBlankInputs(form, rails.fileInputSelector);
327
+
328
+ if (!rails.allowAction(form)) return rails.stopEverything(e);
329
+
330
+ // skip other logic when required values are missing or file upload is present
331
+ if (blankRequiredInputs && form.attr("novalidate") == undefined && rails.fire(form, 'ajax:aborted:required', [blankRequiredInputs])) {
332
+ return rails.stopEverything(e);
333
+ }
334
+
335
+ if (remote) {
336
+ if (nonBlankFileInputs) {
337
+ return rails.fire(form, 'ajax:aborted:file', [nonBlankFileInputs]);
338
+ }
339
+
340
+ // If browser does not support submit bubbling, then this live-binding will be called before direct
341
+ // bindings. Therefore, we should directly call any direct bindings before remotely submitting form.
342
+ if (!$.support.submitBubbles && $().jquery < '1.7' && rails.callFormSubmitBindings(form, e) === false) return rails.stopEverything(e);
343
+
344
+ rails.handleRemote(form);
345
+ return false;
346
+
347
+ } else {
348
+ // slight timeout so that the submit button gets properly serialized
349
+ setTimeout(function(){ rails.disableFormElements(form); }, 13);
350
+ }
351
+ });
352
+
353
+ $(document).delegate(rails.formInputClickSelector, 'click.rails', function(event) {
354
+ var button = $(this);
355
+
356
+ if (!rails.allowAction(button)) return rails.stopEverything(event);
357
+
358
+ // register the pressed submit button
359
+ var name = button.attr('name'),
360
+ data = name ? {name:name, value:button.val()} : null;
361
+
362
+ button.closest('form').data('ujs:submit-button', data);
363
+ });
364
+
365
+ $(document).delegate(rails.formSubmitSelector, 'ajax:beforeSend.rails', function(event) {
366
+ if (this == event.target) rails.disableFormElements($(this));
367
+ });
368
+
369
+ $(document).delegate(rails.formSubmitSelector, 'ajax:complete.rails', function(event) {
370
+ if (this == event.target) rails.enableFormElements($(this));
371
+ });
372
+
373
+ })( jQuery );
@@ -1,2 +1,6 @@
1
1
  // Place all the behaviors and hooks related to the matching controller here.
2
2
  // All this logic will automatically be available in application.js.
3
+
4
+ //= require jquery
5
+ //= require jquery_ujs
6
+ //= require_tree ./validation_issues
@@ -5,7 +5,8 @@ class ValidationIssue < ActiveRecord::Base
5
5
  validates :form_name, :presence => true, :uniqueness => true
6
6
 
7
7
  def clear_data!
8
- self.issue_count = 0
8
+ self.issue_count = 0
9
+ self.success_count = 0
9
10
  self.issue_hash = {}
10
11
  self.notes = ''
11
12
  self.save!
@@ -27,8 +28,8 @@ class ValidationIssue < ActiveRecord::Base
27
28
 
28
29
  def increment_with_sql!(attribute, by = 1)
29
30
  raise ArgumentError("Invalid attribute: #{attribute}") unless attribute_names.include?(attribute.to_s)
30
- original_value_sql = "CASE WHEN `#{attribute}` IS NULL THEN 0 ELSE `#{attribute}` END"
31
- self.class.update_all("`#{attribute}` = #{original_value_sql} + #{by.to_i}", "id = #{id}")
31
+ #original_value_sql = "CASE WHEN `#{attribute}` IS NULL THEN 0 ELSE `#{attribute}` END"
32
+ self.class.update_all("#{attribute} = #{attribute} + #{by.to_i}", "id = #{id}")
32
33
  reload
33
34
  end
34
35
  end
@@ -7,7 +7,7 @@
7
7
  <%= stylesheet_link_tag 'validation_issues' %>
8
8
 
9
9
  <%= csrf_meta_tag %>
10
- <%#= javascript_include_tag :defaults %>
10
+
11
11
 
12
12
  <%= yield :head %>
13
13
 
@@ -38,8 +38,8 @@
38
38
  <%= yield :bottom %>
39
39
 
40
40
  </body>
41
- <script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'></script>
42
- <script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js'></script>
41
+ <%= javascript_include_tag 'validation_issues.js' %>
42
+
43
43
  <script>
44
44
  jQuery(window).ready(
45
45
  function() {
@@ -2,15 +2,51 @@
2
2
 
3
3
  <h2> <%= @validation_issue.issue_type %>: <%= @validation_issue.form_name %> </h2>
4
4
 
5
- <p>
6
- <b>Issues (<%= @validation_issue.issue_count %>):</b>
7
- <ul>
8
- <% @validation_issue.issue_hash.each do |k, v| %>
9
- <li><label> <%= k %>: </label> <%= v %></li>
5
+ <div class='gray_table'>
6
+ <table >
7
+ <thead>
8
+ <tr >
9
+ <th class='column1_header'>Type</th>
10
+ <th>Form Name</th>
11
+ <th># of Issues</th>
12
+ <th>Total Count</th>
13
+ <th></th>
14
+ <th></th>
15
+ </tr>
16
+
17
+ </thead>
18
+ <tr >
19
+ <td><%= @validation_issue.issue_type %></td>
20
+ <td><%= @validation_issue.form_name %></td>
21
+ <td><%= @validation_issue.issue_count %></td>
22
+ <td><%= @validation_issue.total_count %></td>
23
+ <td><%= link_to 'Show', validation_admin_validation_issue_path(@validation_issue) %></td>
24
+ <td><%= link_to 'Reset!',
25
+ validation_admin_validation_issue_path(@validation_issue),
26
+ method: :delete, data: { confirm: 'Are you sure?' } %></td>
27
+ </tr>
28
+ <% if @validation_issue.issue_hash.empty? %>
29
+ <tr <%= cycle('odd', 'even')%>>
30
+ <td colspan='6'>Sorry no Issues Yet</td>
31
+ </tr>
32
+ <% else %>
33
+ <thead>
34
+ <tr>
35
+ <th colspan='2' class='column1_header'>Field</th>
36
+ <th colspan='4'># of Issues</th>
37
+ </tr>
38
+ </thead>
10
39
  <% end %>
11
- </ul>
40
+ <% @validation_issue.issue_hash.each do |k, v| %>
41
+ <tr <%= cycle('odd', 'even')%>>
42
+ <td colspan='2'><%= k %></td>
43
+ <td colspan='4'><%= v %></td>
44
+ </tr>
45
+ <% end %>
46
+
47
+ </table>
48
+ </div>
12
49
 
13
- </p>
14
50
 
15
51
  <% unless @validation_issue.notes.blank? %>
16
52
  <p>
@@ -19,4 +55,4 @@
19
55
  </p>
20
56
  <% end %>
21
57
 
22
- <%= link_to 'Back', validation_admin_validation_issues_path, :class => 'button small-dark-orange-button' %>
58
+ <%= link_to 'Back', validation_admin_validation_issues_path, :class => 'button dark-orange-button' %>
@@ -1,3 +1,3 @@
1
1
  module ValidationIssues
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
Binary file
@@ -1459,3 +1459,434 @@ Completed 200 OK in 4ms (Views: 2.8ms | ActiveRecord: 0.1ms)
1459
1459
   (0.6ms) rollback transaction
1460
1460
   (0.0ms) begin transaction
1461
1461
   (0.0ms) rollback transaction
1462
+ Connecting to database specified by database.yml
1463
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' ORDER BY "validation_issues"."id" DESC LIMIT 1
1464
+  (0.0ms) begin transaction
1465
+  (0.0ms) rollback transaction
1466
+ ValidationIssue Load (0.2ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1467
+  (0.0ms) begin transaction
1468
+ ValidationIssue Exists (0.2ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'user_form' AND "validation_issues"."id" != 1) LIMIT 1
1469
+  (0.3ms) UPDATE "validation_issues" SET "updated_at" = '2012-07-24 06:36:07.355016', "issue_hash" = '---
1470
+ :first_name: 2
1471
+ :nick_name: 2
1472
+ ' WHERE "validation_issues"."id" = 1
1473
+  (1.0ms) commit transaction
1474
+ SQL (1.3ms) UPDATE "validation_issues" SET `issue_count` = CASE WHEN `issue_count` IS NULL THEN 0 ELSE `issue_count` END + 1 WHERE (id = 1)
1475
+ ValidationIssue Load (0.2ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."id" = ? LIMIT 1 [["id", 1]]
1476
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' ORDER BY "validation_issues"."id" DESC LIMIT 1
1477
+  (0.0ms) begin transaction
1478
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1479
+  (0.0ms) SAVEPOINT active_record_1
1480
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'user_form' AND "validation_issues"."id" != 1) LIMIT 1
1481
+  (0.3ms) UPDATE "validation_issues" SET "issue_hash" = '---
1482
+ :first_name: 3
1483
+ ', "updated_at" = '2012-07-24 06:36:07.369270' WHERE "validation_issues"."id" = 1
1484
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1485
+ Processing by ValidationAdmin::ValidationIssuesController#destroy as HTML
1486
+ Parameters: {"id"=>"1"}
1487
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."id" = ? LIMIT 1 [["id", "1"]]
1488
+  (0.0ms) SAVEPOINT active_record_1
1489
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'user_form' AND "validation_issues"."id" != 1) LIMIT 1
1490
+  (0.3ms) UPDATE "validation_issues" SET "issue_count" = 0, "issue_hash" = '--- {}
1491
+
1492
+ ', "updated_at" = '2012-07-24 06:36:07.420013' WHERE "validation_issues"."id" = 1
1493
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1494
+ Redirected to http://test.host/validation_admin/validation_issues
1495
+ Completed 302 Found in 4ms (ActiveRecord: 0.6ms)
1496
+ ValidationIssue Load (0.0ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."id" = ? LIMIT 1 [["id", 1]]
1497
+  (0.4ms) rollback transaction
1498
+  (0.0ms) begin transaction
1499
+ ValidationIssue Load (0.2ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1500
+ Processing by ValidationAdmin::ValidationIssuesController#index as HTML
1501
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" 
1502
+ Rendered /Users/davidhenner/projects/validation_issues/app/views/validation_admin/_validation_admin_header.html.erb (0.3ms)
1503
+ Completed 200 OK in 51ms (Views: 50.2ms | ActiveRecord: 0.1ms)
1504
+  (0.1ms) rollback transaction
1505
+  (0.0ms) begin transaction
1506
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1507
+ Processing by ValidationAdmin::ValidationIssuesController#show as HTML
1508
+ Parameters: {"id"=>"1"}
1509
+ ValidationIssue Load (0.0ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."id" = ? LIMIT 1 [["id", "1"]]
1510
+ Rendered /Users/davidhenner/projects/validation_issues/app/views/validation_admin/_validation_admin_header.html.erb (0.0ms)
1511
+ Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.0ms)
1512
+  (0.0ms) rollback transaction
1513
+  (0.0ms) begin transaction
1514
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'my_super_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1515
+  (0.0ms) SAVEPOINT active_record_1
1516
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE "validation_issues"."form_name" = 'my_super_form' LIMIT 1
1517
+ SQL (0.6ms) INSERT INTO "validation_issues" ("created_at", "form_name", "issue_count", "issue_hash", "issue_type", "notes", "success_count", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Tue, 24 Jul 2012 06:36:07 UTC +00:00], ["form_name", "my_super_form"], ["issue_count", 5], ["issue_hash", "--- \nname: 2\npassword: 3\n"], ["issue_type", "User"], ["notes", ""], ["success_count", 0], ["updated_at", Tue, 24 Jul 2012 06:36:07 UTC +00:00]]
1518
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1519
+  (0.0ms) SAVEPOINT active_record_1
1520
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'my_super_form' AND "validation_issues"."id" != 2) LIMIT 1
1521
+  (0.3ms) UPDATE "validation_issues" SET "issue_count" = 0, "issue_hash" = '--- {}
1522
+
1523
+ ', "updated_at" = '2012-07-24 06:36:07.491845' WHERE "validation_issues"."id" = 2
1524
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1525
+  (0.6ms) rollback transaction
1526
+  (0.0ms) begin transaction
1527
+  (0.0ms) SAVEPOINT active_record_1
1528
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE "validation_issues"."form_name" = 'my_super_form' LIMIT 1
1529
+ SQL (0.3ms) INSERT INTO "validation_issues" ("created_at", "form_name", "issue_count", "issue_hash", "issue_type", "notes", "success_count", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Tue, 24 Jul 2012 06:36:07 UTC +00:00], ["form_name", "my_super_form"], ["issue_count", 5], ["issue_hash", "--- \nname: 2\npassword: 3\n"], ["issue_type", "User"], ["notes", ""], ["success_count", 13], ["updated_at", Tue, 24 Jul 2012 06:36:07 UTC +00:00]]
1530
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1531
+  (0.5ms) rollback transaction
1532
+  (0.0ms) begin transaction
1533
+  (0.0ms) rollback transaction
1534
+ Connecting to database specified by database.yml
1535
+ ValidationIssue Load (0.7ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' ORDER BY "validation_issues"."id" DESC LIMIT 1
1536
+  (0.0ms) begin transaction
1537
+  (0.1ms) rollback transaction
1538
+ ValidationIssue Load (0.5ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1539
+  (0.0ms) begin transaction
1540
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'user_form' AND "validation_issues"."id" != 1) LIMIT 1
1541
+  (0.3ms) UPDATE "validation_issues" SET "updated_at" = '2012-07-24 06:49:53.776655', "issue_hash" = '---
1542
+ :first_name: 3
1543
+ :nick_name: 3
1544
+ ' WHERE "validation_issues"."id" = 1
1545
+  (1.0ms) commit transaction
1546
+ SQL (1.3ms) UPDATE "validation_issues" SET 'issue_count' = CASE WHEN 'issue_count' IS NULL THEN 0 ELSE 'issue_count' END + 1 WHERE (id = 1)
1547
+ ValidationIssue Load (0.2ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."id" = ? LIMIT 1 [["id", 1]]
1548
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' ORDER BY "validation_issues"."id" DESC LIMIT 1
1549
+  (0.1ms) begin transaction
1550
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1551
+  (0.0ms) SAVEPOINT active_record_1
1552
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'user_form' AND "validation_issues"."id" != 1) LIMIT 1
1553
+  (0.2ms) UPDATE "validation_issues" SET "issue_hash" = '---
1554
+ :first_name: 3
1555
+ ', "updated_at" = '2012-07-24 06:49:53.790441' WHERE "validation_issues"."id" = 1
1556
+  (0.1ms) RELEASE SAVEPOINT active_record_1
1557
+ Processing by ValidationAdmin::ValidationIssuesController#destroy as HTML
1558
+ Parameters: {"id"=>"1"}
1559
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."id" = ? LIMIT 1 [["id", "1"]]
1560
+  (0.0ms) SAVEPOINT active_record_1
1561
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'user_form' AND "validation_issues"."id" != 1) LIMIT 1
1562
+  (0.3ms) UPDATE "validation_issues" SET "issue_count" = 0, "issue_hash" = '--- {}
1563
+
1564
+ ', "updated_at" = '2012-07-24 06:49:53.840590' WHERE "validation_issues"."id" = 1
1565
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1566
+ Redirected to http://test.host/validation_admin/validation_issues
1567
+ Completed 302 Found in 4ms (ActiveRecord: 0.5ms)
1568
+ ValidationIssue Load (0.0ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."id" = ? LIMIT 1 [["id", 1]]
1569
+  (0.4ms) rollback transaction
1570
+  (0.0ms) begin transaction
1571
+ ValidationIssue Load (0.2ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1572
+ Processing by ValidationAdmin::ValidationIssuesController#index as HTML
1573
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" 
1574
+ Rendered /Users/davidhenner/projects/validation_issues/app/views/validation_admin/_validation_admin_header.html.erb (0.3ms)
1575
+ Completed 200 OK in 53ms (Views: 52.0ms | ActiveRecord: 0.1ms)
1576
+  (0.1ms) rollback transaction
1577
+  (0.0ms) begin transaction
1578
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1579
+ Processing by ValidationAdmin::ValidationIssuesController#show as HTML
1580
+ Parameters: {"id"=>"1"}
1581
+ ValidationIssue Load (0.0ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."id" = ? LIMIT 1 [["id", "1"]]
1582
+ Rendered /Users/davidhenner/projects/validation_issues/app/views/validation_admin/_validation_admin_header.html.erb (0.0ms)
1583
+ Completed 200 OK in 4ms (Views: 3.1ms | ActiveRecord: 0.0ms)
1584
+  (0.1ms) rollback transaction
1585
+  (0.0ms) begin transaction
1586
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'my_super_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1587
+  (0.0ms) SAVEPOINT active_record_1
1588
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE "validation_issues"."form_name" = 'my_super_form' LIMIT 1
1589
+ SQL (1.3ms) INSERT INTO "validation_issues" ("created_at", "form_name", "issue_count", "issue_hash", "issue_type", "notes", "success_count", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Tue, 24 Jul 2012 06:49:53 UTC +00:00], ["form_name", "my_super_form"], ["issue_count", 5], ["issue_hash", "--- \nname: 2\npassword: 3\n"], ["issue_type", "User"], ["notes", ""], ["success_count", 0], ["updated_at", Tue, 24 Jul 2012 06:49:53 UTC +00:00]]
1590
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1591
+  (0.0ms) SAVEPOINT active_record_1
1592
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'my_super_form' AND "validation_issues"."id" != 2) LIMIT 1
1593
+  (0.3ms) UPDATE "validation_issues" SET "issue_count" = 0, "issue_hash" = '--- {}
1594
+
1595
+ ', "updated_at" = '2012-07-24 06:49:53.915220' WHERE "validation_issues"."id" = 2
1596
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1597
+  (0.5ms) rollback transaction
1598
+  (0.0ms) begin transaction
1599
+  (0.0ms) SAVEPOINT active_record_1
1600
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE "validation_issues"."form_name" = 'my_super_form' LIMIT 1
1601
+ SQL (0.3ms) INSERT INTO "validation_issues" ("created_at", "form_name", "issue_count", "issue_hash", "issue_type", "notes", "success_count", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Tue, 24 Jul 2012 06:49:53 UTC +00:00], ["form_name", "my_super_form"], ["issue_count", 5], ["issue_hash", "--- \nname: 2\npassword: 3\n"], ["issue_type", "User"], ["notes", ""], ["success_count", 13], ["updated_at", Tue, 24 Jul 2012 06:49:53 UTC +00:00]]
1602
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1603
+  (0.3ms) rollback transaction
1604
+  (0.0ms) begin transaction
1605
+  (0.0ms) rollback transaction
1606
+ Connecting to database specified by database.yml
1607
+ ValidationIssue Load (0.8ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' ORDER BY "validation_issues"."id" DESC LIMIT 1
1608
+  (0.0ms) begin transaction
1609
+  (0.0ms) rollback transaction
1610
+ ValidationIssue Load (0.5ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1611
+  (0.0ms) begin transaction
1612
+ ValidationIssue Exists (0.2ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'user_form' AND "validation_issues"."id" != 1) LIMIT 1
1613
+  (0.3ms) UPDATE "validation_issues" SET "updated_at" = '2012-07-24 06:56:49.297101', "issue_hash" = '---
1614
+ :first_name: 4
1615
+ :nick_name: 4
1616
+ ' WHERE "validation_issues"."id" = 1
1617
+  (0.7ms) commit transaction
1618
+ SQL (0.9ms) UPDATE "validation_issues" SET `issue_count` = CASE WHEN `issue_count` IS NULL THEN 0 ELSE `issue_count` END + 1 WHERE (id = 1)
1619
+ ValidationIssue Load (0.2ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."id" = ? LIMIT 1 [["id", 1]]
1620
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' ORDER BY "validation_issues"."id" DESC LIMIT 1
1621
+  (0.1ms) begin transaction
1622
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1623
+  (0.0ms) SAVEPOINT active_record_1
1624
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'user_form' AND "validation_issues"."id" != 1) LIMIT 1
1625
+  (0.2ms) UPDATE "validation_issues" SET "issue_hash" = '---
1626
+ :first_name: 3
1627
+ ', "updated_at" = '2012-07-24 06:56:49.310271' WHERE "validation_issues"."id" = 1
1628
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1629
+ Processing by ValidationAdmin::ValidationIssuesController#destroy as HTML
1630
+ Parameters: {"id"=>"1"}
1631
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."id" = ? LIMIT 1 [["id", "1"]]
1632
+  (0.0ms) SAVEPOINT active_record_1
1633
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'user_form' AND "validation_issues"."id" != 1) LIMIT 1
1634
+  (0.4ms) UPDATE "validation_issues" SET "issue_count" = 0, "issue_hash" = '--- {}
1635
+
1636
+ ', "updated_at" = '2012-07-24 06:56:49.359787' WHERE "validation_issues"."id" = 1
1637
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1638
+ Redirected to http://test.host/validation_admin/validation_issues
1639
+ Completed 302 Found in 4ms (ActiveRecord: 0.6ms)
1640
+ ValidationIssue Load (0.0ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."id" = ? LIMIT 1 [["id", 1]]
1641
+  (0.4ms) rollback transaction
1642
+  (0.0ms) begin transaction
1643
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1644
+ Processing by ValidationAdmin::ValidationIssuesController#index as HTML
1645
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" 
1646
+ Rendered /Users/davidhenner/projects/validation_issues/app/views/validation_admin/_validation_admin_header.html.erb (0.3ms)
1647
+ Completed 200 OK in 53ms (Views: 51.7ms | ActiveRecord: 0.1ms)
1648
+  (0.1ms) rollback transaction
1649
+  (0.0ms) begin transaction
1650
+ ValidationIssue Load (0.2ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1651
+ Processing by ValidationAdmin::ValidationIssuesController#show as HTML
1652
+ Parameters: {"id"=>"1"}
1653
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."id" = ? LIMIT 1 [["id", "1"]]
1654
+ Rendered /Users/davidhenner/projects/validation_issues/app/views/validation_admin/_validation_admin_header.html.erb (0.0ms)
1655
+ Completed 200 OK in 4ms (Views: 3.2ms | ActiveRecord: 0.1ms)
1656
+  (0.1ms) rollback transaction
1657
+  (0.0ms) begin transaction
1658
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'my_super_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1659
+  (0.0ms) SAVEPOINT active_record_1
1660
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE "validation_issues"."form_name" = 'my_super_form' LIMIT 1
1661
+ SQL (1.2ms) INSERT INTO "validation_issues" ("created_at", "form_name", "issue_count", "issue_hash", "issue_type", "notes", "success_count", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Tue, 24 Jul 2012 06:56:49 UTC +00:00], ["form_name", "my_super_form"], ["issue_count", 5], ["issue_hash", "--- \nname: 2\npassword: 3\n"], ["issue_type", "User"], ["notes", ""], ["success_count", 0], ["updated_at", Tue, 24 Jul 2012 06:56:49 UTC +00:00]]
1662
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1663
+  (0.0ms) SAVEPOINT active_record_1
1664
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'my_super_form' AND "validation_issues"."id" != 2) LIMIT 1
1665
+  (0.3ms) UPDATE "validation_issues" SET "issue_count" = 0, "issue_hash" = '--- {}
1666
+
1667
+ ', "updated_at" = '2012-07-24 06:56:49.434770' WHERE "validation_issues"."id" = 2
1668
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1669
+  (0.5ms) rollback transaction
1670
+  (0.0ms) begin transaction
1671
+  (0.0ms) SAVEPOINT active_record_1
1672
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE "validation_issues"."form_name" = 'my_super_form' LIMIT 1
1673
+ SQL (0.3ms) INSERT INTO "validation_issues" ("created_at", "form_name", "issue_count", "issue_hash", "issue_type", "notes", "success_count", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Tue, 24 Jul 2012 06:56:49 UTC +00:00], ["form_name", "my_super_form"], ["issue_count", 5], ["issue_hash", "--- \nname: 2\npassword: 3\n"], ["issue_type", "User"], ["notes", ""], ["success_count", 13], ["updated_at", Tue, 24 Jul 2012 06:56:49 UTC +00:00]]
1674
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1675
+  (0.5ms) rollback transaction
1676
+  (0.0ms) begin transaction
1677
+  (0.0ms) rollback transaction
1678
+ Connecting to database specified by database.yml
1679
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' ORDER BY "validation_issues"."id" DESC LIMIT 1
1680
+  (0.0ms) begin transaction
1681
+  (0.0ms) rollback transaction
1682
+ ValidationIssue Load (0.2ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1683
+  (0.0ms) begin transaction
1684
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'user_form' AND "validation_issues"."id" != 1) LIMIT 1
1685
+  (0.3ms) UPDATE "validation_issues" SET "updated_at" = '2012-07-24 06:57:40.823681', "issue_hash" = '---
1686
+ :first_name: 5
1687
+ :nick_name: 5
1688
+ ' WHERE "validation_issues"."id" = 1
1689
+  (1.1ms) commit transaction
1690
+ SQL (0.6ms) UPDATE "validation_issues" SET validation_issues.issue_count = validation_issues.issue_count + 1 WHERE (id = 1)
1691
+ SQLite3::SQLException: near ".": syntax error: UPDATE "validation_issues" SET validation_issues.issue_count = validation_issues.issue_count + 1 WHERE (id = 1)
1692
+  (0.0ms) begin transaction
1693
+ ValidationIssue Load (0.2ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1694
+  (0.0ms) SAVEPOINT active_record_1
1695
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'user_form' AND "validation_issues"."id" != 1) LIMIT 1
1696
+  (0.2ms) UPDATE "validation_issues" SET "issue_hash" = '---
1697
+ :first_name: 3
1698
+ ', "updated_at" = '2012-07-24 06:57:40.834765' WHERE "validation_issues"."id" = 1
1699
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1700
+ Processing by ValidationAdmin::ValidationIssuesController#destroy as HTML
1701
+ Parameters: {"id"=>"1"}
1702
+ ValidationIssue Load (0.2ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."id" = ? LIMIT 1 [["id", "1"]]
1703
+  (0.0ms) SAVEPOINT active_record_1
1704
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'user_form' AND "validation_issues"."id" != 1) LIMIT 1
1705
+  (0.4ms) UPDATE "validation_issues" SET "issue_count" = 0, "issue_hash" = '--- {}
1706
+
1707
+ ', "updated_at" = '2012-07-24 06:57:40.884398' WHERE "validation_issues"."id" = 1
1708
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1709
+ Redirected to http://test.host/validation_admin/validation_issues
1710
+ Completed 302 Found in 4ms (ActiveRecord: 0.7ms)
1711
+ ValidationIssue Load (0.0ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."id" = ? LIMIT 1 [["id", 1]]
1712
+  (0.6ms) rollback transaction
1713
+  (0.0ms) begin transaction
1714
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1715
+ Processing by ValidationAdmin::ValidationIssuesController#index as HTML
1716
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" 
1717
+ Rendered /Users/davidhenner/projects/validation_issues/app/views/validation_admin/_validation_admin_header.html.erb (0.3ms)
1718
+ Completed 200 OK in 49ms (Views: 48.6ms | ActiveRecord: 0.1ms)
1719
+  (0.1ms) rollback transaction
1720
+  (0.0ms) begin transaction
1721
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1722
+ Processing by ValidationAdmin::ValidationIssuesController#show as HTML
1723
+ Parameters: {"id"=>"1"}
1724
+ ValidationIssue Load (0.0ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."id" = ? LIMIT 1 [["id", "1"]]
1725
+ Rendered /Users/davidhenner/projects/validation_issues/app/views/validation_admin/_validation_admin_header.html.erb (0.0ms)
1726
+ Completed 200 OK in 3ms (Views: 2.6ms | ActiveRecord: 0.0ms)
1727
+  (0.1ms) rollback transaction
1728
+  (0.0ms) begin transaction
1729
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'my_super_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1730
+  (0.0ms) SAVEPOINT active_record_1
1731
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE "validation_issues"."form_name" = 'my_super_form' LIMIT 1
1732
+ SQL (0.5ms) INSERT INTO "validation_issues" ("created_at", "form_name", "issue_count", "issue_hash", "issue_type", "notes", "success_count", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Tue, 24 Jul 2012 06:57:40 UTC +00:00], ["form_name", "my_super_form"], ["issue_count", 5], ["issue_hash", "--- \nname: 2\npassword: 3\n"], ["issue_type", "User"], ["notes", ""], ["success_count", 0], ["updated_at", Tue, 24 Jul 2012 06:57:40 UTC +00:00]]
1733
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1734
+  (0.0ms) SAVEPOINT active_record_1
1735
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'my_super_form' AND "validation_issues"."id" != 2) LIMIT 1
1736
+  (0.3ms) UPDATE "validation_issues" SET "issue_count" = 0, "issue_hash" = '--- {}
1737
+
1738
+ ', "updated_at" = '2012-07-24 06:57:40.954701' WHERE "validation_issues"."id" = 2
1739
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1740
+  (0.6ms) rollback transaction
1741
+  (0.0ms) begin transaction
1742
+  (0.0ms) SAVEPOINT active_record_1
1743
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE "validation_issues"."form_name" = 'my_super_form' LIMIT 1
1744
+ SQL (0.4ms) INSERT INTO "validation_issues" ("created_at", "form_name", "issue_count", "issue_hash", "issue_type", "notes", "success_count", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Tue, 24 Jul 2012 06:57:40 UTC +00:00], ["form_name", "my_super_form"], ["issue_count", 5], ["issue_hash", "--- \nname: 2\npassword: 3\n"], ["issue_type", "User"], ["notes", ""], ["success_count", 13], ["updated_at", Tue, 24 Jul 2012 06:57:40 UTC +00:00]]
1745
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1746
+  (0.4ms) rollback transaction
1747
+  (0.0ms) begin transaction
1748
+  (0.0ms) rollback transaction
1749
+ Connecting to database specified by database.yml
1750
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' ORDER BY "validation_issues"."id" DESC LIMIT 1
1751
+  (0.0ms) begin transaction
1752
+  (0.0ms) rollback transaction
1753
+ ValidationIssue Load (0.2ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1754
+  (0.0ms) begin transaction
1755
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'user_form' AND "validation_issues"."id" != 1) LIMIT 1
1756
+  (0.3ms) UPDATE "validation_issues" SET "updated_at" = '2012-07-24 06:58:27.631191', "issue_hash" = '---
1757
+ :first_name: 6
1758
+ :nick_name: 6
1759
+ ' WHERE "validation_issues"."id" = 1
1760
+  (0.9ms) commit transaction
1761
+ SQL (0.7ms) UPDATE "validation_issues" SET issue_count = issue_count + 1 WHERE (id = 1)
1762
+ ValidationIssue Load (0.2ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."id" = ? LIMIT 1 [["id", 1]]
1763
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' ORDER BY "validation_issues"."id" DESC LIMIT 1
1764
+  (0.0ms) begin transaction
1765
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1766
+  (0.0ms) SAVEPOINT active_record_1
1767
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'user_form' AND "validation_issues"."id" != 1) LIMIT 1
1768
+  (0.2ms) UPDATE "validation_issues" SET "issue_hash" = '---
1769
+ :first_name: 3
1770
+ ', "updated_at" = '2012-07-24 06:58:27.643876' WHERE "validation_issues"."id" = 1
1771
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1772
+ Processing by ValidationAdmin::ValidationIssuesController#destroy as HTML
1773
+ Parameters: {"id"=>"1"}
1774
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."id" = ? LIMIT 1 [["id", "1"]]
1775
+  (0.0ms) SAVEPOINT active_record_1
1776
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'user_form' AND "validation_issues"."id" != 1) LIMIT 1
1777
+  (0.3ms) UPDATE "validation_issues" SET "issue_count" = 0, "issue_hash" = '--- {}
1778
+
1779
+ ', "updated_at" = '2012-07-24 06:58:27.693137' WHERE "validation_issues"."id" = 1
1780
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1781
+ Redirected to http://test.host/validation_admin/validation_issues
1782
+ Completed 302 Found in 4ms (ActiveRecord: 0.6ms)
1783
+ ValidationIssue Load (0.0ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."id" = ? LIMIT 1 [["id", 1]]
1784
+  (0.4ms) rollback transaction
1785
+  (0.0ms) begin transaction
1786
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1787
+ Processing by ValidationAdmin::ValidationIssuesController#index as HTML
1788
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" 
1789
+ Rendered /Users/davidhenner/projects/validation_issues/app/views/validation_admin/_validation_admin_header.html.erb (0.3ms)
1790
+ Completed 200 OK in 53ms (Views: 51.7ms | ActiveRecord: 0.1ms)
1791
+  (0.1ms) rollback transaction
1792
+  (0.0ms) begin transaction
1793
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1794
+ Processing by ValidationAdmin::ValidationIssuesController#show as HTML
1795
+ Parameters: {"id"=>"1"}
1796
+ ValidationIssue Load (0.0ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."id" = ? LIMIT 1 [["id", "1"]]
1797
+ Rendered /Users/davidhenner/projects/validation_issues/app/views/validation_admin/_validation_admin_header.html.erb (0.0ms)
1798
+ Completed 200 OK in 4ms (Views: 3.0ms | ActiveRecord: 0.0ms)
1799
+  (0.1ms) rollback transaction
1800
+  (0.0ms) begin transaction
1801
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'my_super_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1802
+  (0.0ms) SAVEPOINT active_record_1
1803
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE "validation_issues"."form_name" = 'my_super_form' LIMIT 1
1804
+ SQL (0.5ms) INSERT INTO "validation_issues" ("created_at", "form_name", "issue_count", "issue_hash", "issue_type", "notes", "success_count", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Tue, 24 Jul 2012 06:58:27 UTC +00:00], ["form_name", "my_super_form"], ["issue_count", 5], ["issue_hash", "--- \nname: 2\npassword: 3\n"], ["issue_type", "User"], ["notes", ""], ["success_count", 0], ["updated_at", Tue, 24 Jul 2012 06:58:27 UTC +00:00]]
1805
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1806
+  (0.0ms) SAVEPOINT active_record_1
1807
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'my_super_form' AND "validation_issues"."id" != 2) LIMIT 1
1808
+  (0.3ms) UPDATE "validation_issues" SET "issue_count" = 0, "issue_hash" = '--- {}
1809
+
1810
+ ', "updated_at" = '2012-07-24 06:58:27.766984' WHERE "validation_issues"."id" = 2
1811
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1812
+  (0.5ms) rollback transaction
1813
+  (0.0ms) begin transaction
1814
+  (0.0ms) SAVEPOINT active_record_1
1815
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE "validation_issues"."form_name" = 'my_super_form' LIMIT 1
1816
+ SQL (0.3ms) INSERT INTO "validation_issues" ("created_at", "form_name", "issue_count", "issue_hash", "issue_type", "notes", "success_count", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Tue, 24 Jul 2012 06:58:27 UTC +00:00], ["form_name", "my_super_form"], ["issue_count", 5], ["issue_hash", "--- \nname: 2\npassword: 3\n"], ["issue_type", "User"], ["notes", ""], ["success_count", 13], ["updated_at", Tue, 24 Jul 2012 06:58:27 UTC +00:00]]
1817
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1818
+  (0.3ms) rollback transaction
1819
+  (0.0ms) begin transaction
1820
+  (0.0ms) rollback transaction
1821
+ Connecting to database specified by database.yml
1822
+ ValidationIssue Load (0.8ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' ORDER BY "validation_issues"."id" DESC LIMIT 1
1823
+  (0.1ms) begin transaction
1824
+  (0.0ms) rollback transaction
1825
+ ValidationIssue Load (0.7ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1826
+  (0.0ms) begin transaction
1827
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'user_form' AND "validation_issues"."id" != 1) LIMIT 1
1828
+  (0.3ms) UPDATE "validation_issues" SET "updated_at" = '2012-07-24 07:27:19.037266', "issue_hash" = '---
1829
+ :first_name: 7
1830
+ :nick_name: 7
1831
+ ' WHERE "validation_issues"."id" = 1
1832
+  (0.7ms) commit transaction
1833
+ SQL (1.1ms) UPDATE "validation_issues" SET issue_count = issue_count + 1 WHERE (id = 1)
1834
+ ValidationIssue Load (0.2ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."id" = ? LIMIT 1 [["id", 1]]
1835
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' ORDER BY "validation_issues"."id" DESC LIMIT 1
1836
+  (0.1ms) begin transaction
1837
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1838
+  (0.0ms) SAVEPOINT active_record_1
1839
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'user_form' AND "validation_issues"."id" != 1) LIMIT 1
1840
+  (0.2ms) UPDATE "validation_issues" SET "issue_hash" = '---
1841
+ :first_name: 3
1842
+ ', "updated_at" = '2012-07-24 07:27:19.050435' WHERE "validation_issues"."id" = 1
1843
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1844
+ Processing by ValidationAdmin::ValidationIssuesController#destroy as HTML
1845
+ Parameters: {"id"=>"1"}
1846
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."id" = ? LIMIT 1 [["id", "1"]]
1847
+  (0.0ms) SAVEPOINT active_record_1
1848
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'user_form' AND "validation_issues"."id" != 1) LIMIT 1
1849
+  (0.3ms) UPDATE "validation_issues" SET "issue_count" = 0, "issue_hash" = '--- {}
1850
+
1851
+ ', "updated_at" = '2012-07-24 07:27:19.094661' WHERE "validation_issues"."id" = 1
1852
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1853
+ Redirected to http://test.host/validation_admin/validation_issues
1854
+ Completed 302 Found in 4ms (ActiveRecord: 0.6ms)
1855
+ ValidationIssue Load (0.0ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."id" = ? LIMIT 1 [["id", 1]]
1856
+  (0.4ms) rollback transaction
1857
+  (0.0ms) begin transaction
1858
+ ValidationIssue Load (0.2ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1859
+ Processing by ValidationAdmin::ValidationIssuesController#index as HTML
1860
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" 
1861
+ Rendered /Users/davidhenner/projects/validation_issues/app/views/validation_admin/_validation_admin_header.html.erb (0.3ms)
1862
+ Completed 200 OK in 56ms (Views: 55.4ms | ActiveRecord: 0.1ms)
1863
+  (0.1ms) rollback transaction
1864
+  (0.0ms) begin transaction
1865
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'user_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1866
+ Processing by ValidationAdmin::ValidationIssuesController#show as HTML
1867
+ Parameters: {"id"=>"1"}
1868
+ ValidationIssue Load (0.0ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."id" = ? LIMIT 1 [["id", "1"]]
1869
+ Rendered /Users/davidhenner/projects/validation_issues/app/views/validation_admin/_validation_admin_header.html.erb (0.0ms)
1870
+ Completed 200 OK in 4ms (Views: 3.3ms | ActiveRecord: 0.0ms)
1871
+  (0.1ms) rollback transaction
1872
+  (0.0ms) begin transaction
1873
+ ValidationIssue Load (0.1ms) SELECT "validation_issues".* FROM "validation_issues" WHERE "validation_issues"."form_name" = 'my_super_form' AND "validation_issues"."issue_type" = 'User' LIMIT 1
1874
+  (0.0ms) SAVEPOINT active_record_1
1875
+ ValidationIssue Exists (0.0ms) SELECT 1 AS one FROM "validation_issues" WHERE "validation_issues"."form_name" = 'my_super_form' LIMIT 1
1876
+ SQL (1.2ms) INSERT INTO "validation_issues" ("created_at", "form_name", "issue_count", "issue_hash", "issue_type", "notes", "success_count", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Tue, 24 Jul 2012 07:27:19 UTC +00:00], ["form_name", "my_super_form"], ["issue_count", 5], ["issue_hash", "--- \nname: 2\npassword: 3\n"], ["issue_type", "User"], ["notes", ""], ["success_count", 0], ["updated_at", Tue, 24 Jul 2012 07:27:19 UTC +00:00]]
1877
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1878
+  (0.0ms) SAVEPOINT active_record_1
1879
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE ("validation_issues"."form_name" = 'my_super_form' AND "validation_issues"."id" != 2) LIMIT 1
1880
+  (0.3ms) UPDATE "validation_issues" SET "issue_count" = 0, "issue_hash" = '--- {}
1881
+
1882
+ ', "updated_at" = '2012-07-24 07:27:19.173076' WHERE "validation_issues"."id" = 2
1883
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1884
+  (0.6ms) rollback transaction
1885
+  (0.0ms) begin transaction
1886
+  (0.0ms) SAVEPOINT active_record_1
1887
+ ValidationIssue Exists (0.1ms) SELECT 1 AS one FROM "validation_issues" WHERE "validation_issues"."form_name" = 'my_super_form' LIMIT 1
1888
+ SQL (0.3ms) INSERT INTO "validation_issues" ("created_at", "form_name", "issue_count", "issue_hash", "issue_type", "notes", "success_count", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Tue, 24 Jul 2012 07:27:19 UTC +00:00], ["form_name", "my_super_form"], ["issue_count", 5], ["issue_hash", "--- \nname: 2\npassword: 3\n"], ["issue_type", "User"], ["notes", ""], ["success_count", 13], ["updated_at", Tue, 24 Jul 2012 07:27:19 UTC +00:00]]
1889
+  (0.0ms) RELEASE SAVEPOINT active_record_1
1890
+  (0.5ms) rollback transaction
1891
+  (0.0ms) begin transaction
1892
+  (0.0ms) rollback transaction
@@ -15,6 +15,7 @@ class ValidationIssueTest < ActiveSupport::TestCase
15
15
  end
16
16
  validation_issue.clear_data!
17
17
  assert_equal validation_issue.issue_count, 0
18
+ assert_equal validation_issue.success_count, 0
18
19
  # puts @validation_issue.issue_hash.size
19
20
  validation_issue.issue_hash.each do |key, num|
20
21
  assert_equal 0, num
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: validation_issues
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.3
5
+ version: 0.0.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - David Henner
@@ -44,6 +44,7 @@ extensions: []
44
44
  extra_rdoc_files: []
45
45
 
46
46
  files:
47
+ - app/assets/javascripts/validation_issues/rails.js
47
48
  - app/assets/javascripts/validation_issues.js
48
49
  - app/assets/stylesheets/scaffold.css
49
50
  - app/assets/stylesheets/validation_issues/buttons.css