searchy 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@ module Searchy
5
5
 
6
6
  module ClassMethods
7
7
  def search(query = nil)
8
- @query = query.strip.split(/\s+/)
8
+ @query = query.to_s.strip.split(/\s+/)
9
9
  search_scope
10
10
  end
11
11
 
@@ -1,3 +1,3 @@
1
1
  module Searchy
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
data/readme.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Searchy
2
2
 
3
+ ## Introduction
4
+
5
+ Searchy is the simplest search gem available. It will search all `string` and `text` fields of a model for the given keyword/s. Searchy returns a `ActiveRecord::Relation`, so may be chained with other scopes.
6
+
7
+ ## Caveats
8
+
9
+ Only tested on MySQL and Ruby 1.9.3
10
+
3
11
  ## Usage
4
12
 
5
13
  User.search('jim').limit(10)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: searchy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2012-03-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
16
- requirement: &70114209015040 !ruby/object:Gem::Requirement
16
+ requirement: &70310175286980 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 3.0.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70114209015040
24
+ version_requirements: *70310175286980
25
25
  description: The simplest search gem
26
26
  email:
27
27
  - jimneath@gmail.com