cowtech-rails 1.7.4.0 → 1.7.5.0

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.
@@ -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
- external.fetch(:fields, []).each do |external_field| external_conds << "(#{search.gsub("@FIELD@", "#{external[:table]}.#{external_field.to_s}")})" end
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
@@ -9,7 +9,7 @@ module Cowtech
9
9
  module Version
10
10
  MAJOR = 1
11
11
  MINOR = 7
12
- PATCH = 4
12
+ PATCH = 5
13
13
  BUILD = 0
14
14
 
15
15
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
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.0
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-05-24 00:00:00.000000000Z
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