simonmenke-globalize2 0.0.5 → 0.0.6
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.
|
@@ -25,6 +25,7 @@ module Globalize
|
|
|
25
25
|
extend ClassMethods
|
|
26
26
|
|
|
27
27
|
metaclass.alias_method_chain :find_every, :globalize2
|
|
28
|
+
metaclass.alias_method_chain :construct_finder_sql, :globalize2
|
|
28
29
|
|
|
29
30
|
self.globalize_proxy = Globalize::Model::ActiveRecord.create_proxy_class(self)
|
|
30
31
|
has_many(
|
|
@@ -118,6 +119,12 @@ module Globalize
|
|
|
118
119
|
end
|
|
119
120
|
end
|
|
120
121
|
|
|
122
|
+
def construct_finder_sql_with_globalize2(options)
|
|
123
|
+
sql = construct_finder_sql_without_globalize2(options)
|
|
124
|
+
sql.sub! /SELECT(\s+DISTINCT)?/, 'SELECT DISTINCT'
|
|
125
|
+
sql
|
|
126
|
+
end
|
|
127
|
+
|
|
121
128
|
private
|
|
122
129
|
|
|
123
130
|
def i18n_attr(attribute_name)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: simonmenke-globalize2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Josh Harvey
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-06-
|
|
12
|
+
date: 2009-06-30 00:00:00 -07:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies: []
|
|
15
15
|
|