validation_issues 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9e1057cc73973c01029a6bda7f6ba87e3c529071
4
- data.tar.gz: be8f1fba4ebb707659744f125f84322f48d89128
3
+ metadata.gz: eac8e6ad1021e214ec89468b22006aec273097ab
4
+ data.tar.gz: adbcf03484b59de238c39063ab7ab23ffc6ee5ba
5
5
  SHA512:
6
- metadata.gz: 8420abfdbf2341650fb17543588e61e8ba1fdd1af5e2702a33fc49ae974e1a62ad02fc8e6bf3f2eb03e3721941e7fa2b4bc483fd0ee631f47345cfb406f7010a
7
- data.tar.gz: 9d507151cd8c2560ca76fe7b126b93ed72797fac69783690c61e2db682827827c4f50fc2b62dca99b6e629509c067a76ee11968119b37c7546852927c0e04066
6
+ metadata.gz: 727b5c5a86a2d62c00b6035694d5702e2695c41e1de26773dc05c9361a2ae0a79c39e7661d827c71b88c7da3edfd7726133dfed617ba02c1f6952b3857345d07
7
+ data.tar.gz: 58200da807e2d563d24c362346ed395fb614a1e767b6224578dcbe2cfa8a1d0b7b56575f85724bc791201a62fddb6d9d7c8739ff493ebcea521771cdd5ec9c68
@@ -28,7 +28,8 @@ class ValidationIssue < ActiveRecord::Base
28
28
  def increment_with_sql!(attribute, by = 1)
29
29
  raise ArgumentError("Invalid attribute: #{attribute}") unless attribute_names.include?(attribute.to_s)
30
30
  #original_value_sql = "CASE WHEN `#{attribute}` IS NULL THEN 0 ELSE `#{attribute}` END"
31
- self.class.update_all("#{attribute} = #{attribute} + #{by.to_i}", "id = #{id}")
31
+ self.class.where("id = #{id}").update_all("#{attribute} = #{attribute} + #{by.to_i}")
32
+
32
33
  reload
33
34
  end
34
35
  end
@@ -1,3 +1,3 @@
1
1
  module ValidationIssues
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validation_issues
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Henner
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-19 00:00:00.000000000 Z
11
+ date: 2015-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails