searchgasm 0.9.7 → 0.9.8
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.
- data/CHANGELOG +2 -0
- data/README.rdoc +5 -4
- data/lib/searchgasm/config.rb +12 -0
- data/lib/searchgasm/helpers/search_helper.rb +1 -1
- data/lib/searchgasm/search/base.rb +4 -0
- data/lib/searchgasm/version.rb +1 -1
- data/searchgasm.gemspec +3 -3
- metadata +2 -2
data/CHANGELOG
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
v0.9.8. Fixed order_by helper bug when determing the text with arrays. Should use the first value instead of last. Added in per_page config option.
|
|
2
|
+
|
|
1
3
|
v0.9.7. Complete class restructure, much more organized, added in documentation, added in helpers for using searchgasm in a rails app, updated readme with link to documentation as well as a live example, some bug fixes, more tests
|
|
2
4
|
|
|
3
5
|
v0.9.6. Fix bug when instantiating with nil options
|
data/README.rdoc
CHANGED
|
@@ -11,7 +11,8 @@ I'm a big fan of understanding what I'm using, so here's a quick explanation: Th
|
|
|
11
11
|
== Quicklinks
|
|
12
12
|
|
|
13
13
|
* <b>Documentation:</b> http://searchgasm.rubyforge.org
|
|
14
|
-
* <b>
|
|
14
|
+
* <b>Easy pagination, ordering, and searching tutorial:</b> http://www.binarylogic.com/2008/9/7/tutorial-pagination-ordering-and-searching-with-searchgasm
|
|
15
|
+
* <b>The tutorial above, live:</b> http://searchgasm_example.binarylogic.com
|
|
15
16
|
|
|
16
17
|
== Install and use
|
|
17
18
|
|
|
@@ -326,9 +327,9 @@ http://binarylogic.lighthouseapp.com/projects/16601-searchgasm
|
|
|
326
327
|
|
|
327
328
|
== Credits
|
|
328
329
|
|
|
329
|
-
Author:
|
|
330
|
+
Author: {Ben Johnson}[http://github.com/binarylogic] of {Binary Logic}[http://www.binarylogic.com]
|
|
330
331
|
|
|
331
|
-
Credit to
|
|
332
|
+
Credit to {Zack Ham}[http://github.com/zackham] and {Robert Malko}[http://github.com/malkomalko/] for helping with feature suggestions.
|
|
332
333
|
|
|
333
334
|
|
|
334
|
-
Copyright (c) 2008
|
|
335
|
+
Copyright (c) 2008 {Ben Johnson}[http://github.com/binarylogic] of {Binary Logic}[http://www.binarylogic.com], released under the MIT license
|
data/lib/searchgasm/config.rb
CHANGED
|
@@ -55,6 +55,18 @@ module Searchgasm
|
|
|
55
55
|
@pages_type = value.to_sym
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
+
def per_page # :nodoc:
|
|
59
|
+
@per_page
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# The default for per page.
|
|
63
|
+
#
|
|
64
|
+
# * <tt>Default:</tt> nil, nil means "show all"
|
|
65
|
+
# * <tt>Accepts:</tt> Any value in your per_page choices
|
|
66
|
+
def per_page=(value)
|
|
67
|
+
@per_page = value
|
|
68
|
+
end
|
|
69
|
+
|
|
58
70
|
def per_page_choices # :nodoc:
|
|
59
71
|
@per_page_choices ||= [10, 25, 50, 100, 150, 200, nil]
|
|
60
72
|
end
|
|
@@ -164,7 +164,7 @@ module Searchgasm
|
|
|
164
164
|
when String, Symbol
|
|
165
165
|
relationship_name.blank? ? column_name.titleize : "#{relationship_name.titleize} #{column_name.titleize}"
|
|
166
166
|
when Array
|
|
167
|
-
determine_order_by_text(column_name.
|
|
167
|
+
determine_order_by_text(column_name.first)
|
|
168
168
|
when Hash
|
|
169
169
|
k = column_name.keys.first
|
|
170
170
|
v = column_name.values.first
|
data/lib/searchgasm/version.rb
CHANGED
data/searchgasm.gemspec
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
# Gem::Specification for Searchgasm-0.9.
|
|
2
|
+
# Gem::Specification for Searchgasm-0.9.8
|
|
3
3
|
# Originally generated by Echoe
|
|
4
4
|
|
|
5
5
|
--- !ruby/object:Gem::Specification
|
|
6
6
|
name: searchgasm
|
|
7
7
|
version: !ruby/object:Gem::Version
|
|
8
|
-
version: 0.9.
|
|
8
|
+
version: 0.9.8
|
|
9
9
|
platform: ruby
|
|
10
10
|
authors:
|
|
11
11
|
- Ben Johnson of Binary Logic
|
|
12
12
|
autorequire:
|
|
13
13
|
bindir: bin
|
|
14
14
|
|
|
15
|
-
date: 2008-09-
|
|
15
|
+
date: 2008-09-07 00:00:00 -04:00
|
|
16
16
|
default_executable:
|
|
17
17
|
dependencies:
|
|
18
18
|
- !ruby/object:Gem::Dependency
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: searchgasm
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.9.
|
|
4
|
+
version: 0.9.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ben Johnson of Binary Logic
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2008-09-
|
|
12
|
+
date: 2008-09-07 00:00:00 -04:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|