rails_db_localize 0.0.7 → 0.0.8

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: 2d482185af200f28770730b31afad5eeba3089b0
4
- data.tar.gz: 3869c9ace89f40eb45e65fac691a6044c7449844
3
+ metadata.gz: 9cbd4a547100f76eaa3ca4bef99db89517692708
4
+ data.tar.gz: 21b1fee40cbedaa1e732c2a67a5c310d70282fec
5
5
  SHA512:
6
- metadata.gz: 77a408f7a13ce5ad91308bcea90b9ef3c9510c6c2315561354767de1ee9d79f5d00b13794fcb213a1ed2bb8631bb4a7a1f5f9803addaf4fb2b71053aae2609b4
7
- data.tar.gz: 95e6d5ad9452c16c68889a96f524428c9869f9042794e6892b6d22c93f2154c88906f25286f8ddc566d791a6b333feb36402fb31d9a11ca6eec5a25e00fe4eec
6
+ metadata.gz: df1804b518298e89800a0bc43356051c902f1db1f96b396c7db06d5efa9d399e4047200b072676b8a1747ecd7082dede48a5b46291bb3a9c44b01fb77b6112fd
7
+ data.tar.gz: 61d1853a7f254ec6432fcb53c654b04934813eca784b7f5e95c8cef829ead4be46ab64455ef9ce216e17ea9406d7b1017648775b49dc40615e7310cfa79cd5a8
data/README.md CHANGED
@@ -121,6 +121,10 @@ Create two users with role translator with from/to_language "en/fr" and "fr/es".
121
121
 
122
122
  # Changelog
123
123
 
124
+ ## 0.8
125
+
126
+ * The gem is now compatible with postgresql
127
+
124
128
  ## 0.3
125
129
 
126
130
  * Fix issues inside the gem.
@@ -23,7 +23,7 @@ class ActiveRecord::Base
23
23
  table.select(:id).joins("INNER JOIN \"#{ttable}\"
24
24
  ON (\"#{ttable}\".resource_id = \"#{arel_table.name}\".id
25
25
  AND \"#{ttable}\".resource_type = '#{to_s}')")
26
- .group(:resource_type, :resource_id)
26
+ .group(:resource_type, :resource_id, :id)
27
27
  .having("COUNT(*) = #{number_of_fields_to_translates}")
28
28
  .where(:"rails_db_localize_translations.lang" => lang)
29
29
  }
@@ -35,7 +35,7 @@ public
35
35
  def prefetch_collections *collections
36
36
  # empty string is used here to be sure there's at least one element
37
37
  # for IN clause in SQL (otherwise it will fail miserabily)
38
- in_clause = collections.inject([""]) do |arr, collection|
38
+ in_clause = collections.inject([-1]) do |arr, collection|
39
39
  klass = if collection.respond_to?(:klass)
40
40
  collection.klass #is a ActiveRecord::Relation
41
41
  else
@@ -1,3 +1,3 @@
1
1
  module RailsDbLocalize
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_db_localize
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yacine PETITPREZ
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.7'
83
+ - !ruby/object:Gem::Dependency
84
+ name: pg
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0.18'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0.18'
83
97
  description: 'Translation JIT: You don''t need to think about translation in your
84
98
  project until you begin the translation process...'
85
99
  email: