rd_searchlogic 3.0.0 → 3.0.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.
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 3
3
3
  :minor: 0
4
- :patch: 0
4
+ :patch: 1
@@ -37,7 +37,9 @@ module Searchlogic
37
37
  end
38
38
 
39
39
  def create_association_ordering_condition(association, order_as, condition, args)
40
- scope("#{order_as}_by_#{association.name}_#{condition}", association_condition_options(association, "#{order_as}_by_#{condition}", args))
40
+ table_name = association.options[:class_name].constantize.table_name
41
+ scope("ascend_by_#{association.name}_#{condition}", {:joins => association.name.to_sym, :order => "#{table_name}.#{condition} ASC"})
42
+ scope("descend_by_#{association.name}_#{condition}", {:joins => association.name.to_sym, :order => "#{table_name}.#{condition} DESC"})
41
43
  end
42
44
  end
43
45
  end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rd_searchlogic}
8
- s.version = "3.0.0"
8
+ s.version = "3.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 = ["Ben Johnson of Binary Logic", "Roman Smirnov of RailsDog"]
12
- s.date = %q{2010-12-14}
12
+ s.date = %q{2011-01-09}
13
13
  s.description = %q{Searchlogic makes using ActiveRecord named scopes easier and less repetitive.}
14
14
  s.email = %q{bjohnson@binarylogic.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 3
7
7
  - 0
8
- - 0
9
- version: 3.0.0
8
+ - 1
9
+ version: 3.0.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ben Johnson of Binary Logic
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-14 00:00:00 +03:00
18
+ date: 2011-01-09 00:00:00 +03:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency