bowtie 0.4.7 → 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- data/bowtie.gemspec +1 -1
- data/lib/bowtie/adapters/datamapper.rb +3 -3
- metadata +3 -3
data/bowtie.gemspec
CHANGED
@@ -5,11 +5,11 @@ module Bowtie
|
|
5
5
|
end
|
6
6
|
|
7
7
|
def self.search(model, q, page)
|
8
|
-
query =
|
8
|
+
query = []
|
9
9
|
model.searchable_fields.each do |field|
|
10
|
-
query
|
10
|
+
query << "#{model}.all(:#{field}.like => '%#{q}%')"
|
11
11
|
end
|
12
|
-
|
12
|
+
eval(query.join(' + ')).page(page, :per_page => PER_PAGE)
|
13
13
|
end
|
14
14
|
|
15
15
|
def self.get_many(model, params, page)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bowtie
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 8
|
10
|
+
version: 0.4.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Tom\xC3\xA1s Pollak"
|