cowtech-rails 1.7.4.0 → 1.7.5.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -169,8 +169,15 @@ module Cowtech
|
|
169
169
|
external_query = "(#{external.fetch(:field, "id")} IN (SELECT #{external.fetch(:external_field, "id")} FROM #{external[:table]} WHERE #{external_conds.join(" OR ")}))"
|
170
170
|
else
|
171
171
|
external_conds = []
|
172
|
-
|
172
|
+
raw_external_conds = []
|
173
|
+
|
174
|
+
external.fetch(:fields, []).each do |external_field|
|
175
|
+
external_conds << "(#{search.gsub("@FIELD@", "#{external[:table]}.#{external_field.to_s}")})"
|
176
|
+
raw_external_conds << "(#{search.gsub("@FIELD@", "#{external_field.to_s}")})"
|
177
|
+
end
|
178
|
+
|
173
179
|
external_query = external[:query].gsub("@SEARCH@", external_conds.join(" OR "))
|
180
|
+
external_query = external[:query].gsub("@RAW_SEARCH@", raw_external_conds.join(" OR "))
|
174
181
|
end
|
175
182
|
|
176
183
|
search_query << external_query
|
data/lib/cowtech/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cowtech-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.5.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-06-22 00:00:00.000000000Z
|
13
13
|
dependencies: []
|
14
14
|
description: A general purpose Rails utility plugin.
|
15
15
|
email: shogun_panda@me.com
|