meta_search 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ Changes since 1.0.0 (2011-01-17):
2
+ * Update polymorphic join support to play nicely with MetaWhere
3
+
1
4
  Changes since 0.9.11 (2011-01-06):
2
5
  * Doc updates only.
3
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
@@ -24,7 +24,6 @@ module MetaSearch
24
24
 
25
25
  def build_with_metasearch(associations, parent = nil, join_type = Arel::Nodes::InnerJoin, polymorphic_class = nil)
26
26
  parent ||= @joins.last
27
-
28
27
  case associations
29
28
  when Symbol, String
30
29
  reflection = parent.reflections[associations.to_s.intern] or
@@ -33,7 +32,7 @@ module MetaSearch
33
32
  @reflections << reflection
34
33
  if reflection.options[:polymorphic]
35
34
  raise ArgumentError, "You can't create a polymorphic belongs_to join without specifying the polymorphic class!" unless polymorphic_class
36
- association = build_polymorphic_join_association(reflection, parent, polymorphic_class)
35
+ association = PolymorphicJoinAssociation.new(reflection, self, polymorphic_class, parent)
37
36
  else
38
37
  association = build_join_association(reflection, parent)
39
38
  end
@@ -45,10 +44,6 @@ module MetaSearch
45
44
  build(associations, parent, join_type)
46
45
  end
47
46
  end
48
-
49
- def build_polymorphic_join_association(reflection, parent, klass)
50
- PolymorphicJoinAssociation.new(reflection, self, klass, parent)
51
- end
52
47
  end
53
48
 
54
49
  class PolymorphicJoinAssociation < ActiveRecord::Associations::ClassMethods::JoinDependency::JoinAssociation
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 = "1.0.0"
8
+ s.version = "1.0.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{2011-01-17}
12
+ s.date = %q{2011-01-18}
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
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 0
9
- version: 1.0.0
8
+ - 1
9
+ version: 1.0.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ernie Miller
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-01-17 00:00:00 -05:00
17
+ date: 2011-01-18 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency