meta_search 0.9.7 → 0.9.7.1
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 +3 -0
- data/VERSION +1 -1
- data/lib/meta_search/builder.rb +1 -1
- data/lib/meta_search/join_dependency.rb +6 -3
- data/meta_search.gemspec +2 -2
- metadata +3 -2
data/CHANGELOG
CHANGED
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.9.7
|
|
1
|
+
0.9.7.1
|
data/lib/meta_search/builder.rb
CHANGED
|
@@ -257,7 +257,7 @@ module MetaSearch
|
|
|
257
257
|
assoc.parent == parent
|
|
258
258
|
end
|
|
259
259
|
unless found_association
|
|
260
|
-
@join_dependency.send(:
|
|
260
|
+
@join_dependency.send(:build_with_metasearch, association, parent, Arel::OuterJoin, klass)
|
|
261
261
|
found_association = @join_dependency.join_associations.last
|
|
262
262
|
@relation = @relation.joins(found_association)
|
|
263
263
|
end
|
|
@@ -4,7 +4,6 @@ module MetaSearch
|
|
|
4
4
|
|
|
5
5
|
def self.included(base)
|
|
6
6
|
base.class_eval do
|
|
7
|
-
alias_method_chain :build, :metasearch
|
|
8
7
|
alias_method_chain :graft, :metasearch
|
|
9
8
|
end
|
|
10
9
|
end
|
|
@@ -12,7 +11,11 @@ module MetaSearch
|
|
|
12
11
|
def graft_with_metasearch(*associations)
|
|
13
12
|
associations.each do |association|
|
|
14
13
|
join_associations.detect {|a| association == a} ||
|
|
15
|
-
|
|
14
|
+
(
|
|
15
|
+
association.class == MetaSearch::PolymorphicJoinAssociation ?
|
|
16
|
+
build_with_metasearch(association.reflection.name, association.find_parent_in(self) || join_base, association.join_class, association.reflection.klass) :
|
|
17
|
+
build(association.reflection.name, association.find_parent_in(self) || join_base, association.join_class)
|
|
18
|
+
)
|
|
16
19
|
end
|
|
17
20
|
self
|
|
18
21
|
end
|
|
@@ -33,7 +36,7 @@ module MetaSearch
|
|
|
33
36
|
@joins << build_join_association(reflection, parent).with_join_class(join_class)
|
|
34
37
|
end
|
|
35
38
|
else
|
|
36
|
-
|
|
39
|
+
build(association, parent, join_class) # Shouldn't get here.
|
|
37
40
|
end
|
|
38
41
|
end
|
|
39
42
|
|
data/meta_search.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{meta_search}
|
|
8
|
-
s.version = "0.9.7"
|
|
8
|
+
s.version = "0.9.7.1"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Ernie Miller"]
|
|
12
|
-
s.date = %q{2010-10-
|
|
12
|
+
s.date = %q{2010-10-12}
|
|
13
13
|
s.description = %q{
|
|
14
14
|
Allows simple search forms to be created against an AR3 model
|
|
15
15
|
and its associations, has useful view helpers for sort links
|
metadata
CHANGED
|
@@ -6,7 +6,8 @@ version: !ruby/object:Gem::Version
|
|
|
6
6
|
- 0
|
|
7
7
|
- 9
|
|
8
8
|
- 7
|
|
9
|
-
|
|
9
|
+
- 1
|
|
10
|
+
version: 0.9.7.1
|
|
10
11
|
platform: ruby
|
|
11
12
|
authors:
|
|
12
13
|
- Ernie Miller
|
|
@@ -14,7 +15,7 @@ autorequire:
|
|
|
14
15
|
bindir: bin
|
|
15
16
|
cert_chain: []
|
|
16
17
|
|
|
17
|
-
date: 2010-10-
|
|
18
|
+
date: 2010-10-12 00:00:00 -04:00
|
|
18
19
|
default_executable:
|
|
19
20
|
dependencies:
|
|
20
21
|
- !ruby/object:Gem::Dependency
|