scoped-search 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +1 -1
- data/VERSION +1 -1
- data/lib/scoped_search.rb +6 -2
- metadata +4 -4
data/README.textile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/lib/scoped_search.rb
CHANGED
@@ -53,8 +53,12 @@ class ScopedSearch
|
|
53
53
|
if record.is_a?(ScopedSearch::Base)
|
54
54
|
options = args.extract_options!
|
55
55
|
options.symbolize_keys!
|
56
|
-
|
57
|
-
|
56
|
+
|
57
|
+
default_model_route = (polymorphic_path(record.model_class) rescue nil)
|
58
|
+
|
59
|
+
options.reverse_merge!({ :url => default_model_route, :as => :search })
|
60
|
+
raise "You have to manually specify :url in your form_for options..." unless options[:url].present?
|
61
|
+
|
58
62
|
options[:html] ||= {}
|
59
63
|
options[:html].reverse_merge!({ :method => :get })
|
60
64
|
args << options
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scoped-search
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- slainer68
|