rd_searchlogic 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/lib/searchlogic/named_scopes/association_ordering.rb +3 -1
- data/rd_searchlogic.gemspec +2 -2
- metadata +3 -3
data/VERSION.yml
CHANGED
@@ -37,7 +37,9 @@ module Searchlogic
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def create_association_ordering_condition(association, order_as, condition, args)
|
40
|
-
|
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
|
data/rd_searchlogic.gemspec
CHANGED
@@ -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.
|
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{
|
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
|
-
-
|
9
|
-
version: 3.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:
|
18
|
+
date: 2011-01-09 00:00:00 +03:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|