postgresql-check 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 03755b91fbd278362a4e4df07e83bbabdd6d0c75
4
- data.tar.gz: a9046295300501600d907d6e0cf1b9a6dae71f53
3
+ metadata.gz: 5319290d191e9e7d1a0324731ec42fc30804e242
4
+ data.tar.gz: 0c8a634a1f57a2073a9b9faebe754a9ef5fd3b3b
5
5
  SHA512:
6
- metadata.gz: f319888b385d891e05236aa20ec1d9aa2ea80a411491b091e9c19103ded82984f22b45ffb0660f8895660b567f0d8014f5fc0938c7842300ea94a8377541d6fa
7
- data.tar.gz: 277c4baf68afe7e6696f127f74b126e586e3ef3ffe09bb7d41f7c28b4a1926f1afed0b105bf216f8ecab6025c32d6ed324100a36c5a8c2416a259ae5ad1a53ac
6
+ metadata.gz: 9d48891a18596c896cd9527eedc6897508917fbeca7a97a7554630e6471d9a05e5a2666d9f02493bb1e195ed834ab62465780eafad1e9f811c0f757264f391ab
7
+ data.tar.gz: e7c412693d21a9a104ece22bb7123e911a273ada58dd4df5fd30dd88ed6bb01b2667519bc31323e691809f8c3d90396de6e4f406c510cc3a1a9be9d7bcd30e7b
@@ -2,12 +2,22 @@ module Postgresql
2
2
  module Check
3
3
  module Table
4
4
  def check(condition, options)
5
- @base.add_check(@table_name, condition, options)
5
+ @base.add_check(check_table_name, condition, options)
6
6
  end
7
7
 
8
8
  def remove_check(options)
9
- @base.remove_check(@table_name, options)
9
+ @base.remove_check(check_table_name, options)
10
+ end
11
+
12
+ private
13
+ # @api private
14
+ def check_table_name
15
+ if ActiveRecord::VERSION::STRING > "4.2"
16
+ @name
17
+ else
18
+ @table_name
19
+ end
10
20
  end
11
21
  end
12
22
  end
13
- end
23
+ end
@@ -1,5 +1,5 @@
1
1
  module Postgresql
2
2
  module Check
3
- VERSION = '0.0.2'
3
+ VERSION = '0.0.3'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postgresql-check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexei Mikhailov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-24 00:00:00.000000000 Z
11
+ date: 2015-02-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord