simple-search 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +12 -13
- data/VERSION +1 -1
- data/simple-search.gemspec +1 -1
- metadata +2 -2
data/README.rdoc
CHANGED
@@ -12,28 +12,27 @@ Main goal is to simplify all search related operations from url.
|
|
12
12
|
In your Gemfile:
|
13
13
|
|
14
14
|
gem "simple-search" # Last officially released gem
|
15
|
-
# gem "simple-search", :git => "git://github.com/bighostkim/simple-search.git"
|
16
15
|
|
17
16
|
In your controller:
|
18
17
|
|
19
18
|
def index
|
20
19
|
@posts = Post.simplesearch(params)
|
21
|
-
|
22
|
-
|
20
|
+
# or, @posts = Post.simplesearch(params[:ss]) # when group options to "ss"
|
21
|
+
# or, @posts = Post.simplesearch(:id_gt=>1,:id_lt=>3)
|
23
22
|
end
|
24
23
|
|
25
24
|
In your view:
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
25
|
+
|
26
|
+
<%= form_tag('/posts') do -%>
|
27
|
+
<%= text_field_tag 'id_gt' %>
|
28
|
+
<%= text_field_tag 'id_lt' %>
|
30
29
|
.....
|
31
|
-
|
32
|
-
|
30
|
+
<%= submit_tag %>
|
31
|
+
<% end -%>
|
33
32
|
|
34
|
-
|
33
|
+
<%=order_link(:id, "Order by ID" )%>
|
35
34
|
|
36
|
-
|
35
|
+
<%=page_urls(@posts)%>
|
37
36
|
|
38
37
|
=== Search postfixes
|
39
38
|
|
@@ -60,9 +59,9 @@ In your view:
|
|
60
59
|
|
61
60
|
=== Paging
|
62
61
|
* page , page number
|
63
|
-
|
62
|
+
i.e. &page=1
|
64
63
|
* page_by, number of rows in a page
|
65
|
-
|
64
|
+
i.e. &page_by=10
|
66
65
|
|
67
66
|
== Contributing to simple-search
|
68
67
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.10.
|
1
|
+
0.10.2
|
data/simple-search.gemspec
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: simple-search
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.10.
|
5
|
+
version: 0.10.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Allen Kim
|
@@ -152,7 +152,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
152
152
|
requirements:
|
153
153
|
- - ">="
|
154
154
|
- !ruby/object:Gem::Version
|
155
|
-
hash:
|
155
|
+
hash: 58172121329259163
|
156
156
|
segments:
|
157
157
|
- 0
|
158
158
|
version: "0"
|