services 2.2.4 → 2.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/services/base_finder.rb +2 -1
- data/lib/services/version.rb +1 -1
- data/spec/services/modules/call_logger_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1400e6ff9c2b46562e08881c6d094a0bb5de1459
|
4
|
+
data.tar.gz: 5e7b0018546aadd2b51d8e319cc2c5a551d7c893
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e0bd521415d59a379fb9f3dce599d18631df2e6255239d559d12b52d6e92d235bac4f10234e959257ca44ab0c235c7e4f0ffc565682555247c249167487dbffe
|
7
|
+
data.tar.gz: d9af93a2ce8ad3c855bde9e30b9681a2ec0a877758acf5297c0828bddf95524d7926f23a699e2179b18dfa7b2e0e55deaa25922d9c51edc652165205994f5ad9
|
data/lib/services/base_finder.rb
CHANGED
@@ -7,7 +7,7 @@ module Services
|
|
7
7
|
object_table_id = "#{object_class.table_name}.id"
|
8
8
|
|
9
9
|
special_conditions = conditions.extract!(:order, :limit, :page, :per_page)
|
10
|
-
special_conditions[:order]
|
10
|
+
special_conditions[:order] = object_table_id unless special_conditions.has_key?(:order)
|
11
11
|
|
12
12
|
scope = object_class.public_send(Rails::VERSION::MAJOR == 3 ? :scoped : :all)
|
13
13
|
scope = scope.where(object_table_id => ids) unless ids.empty?
|
@@ -20,6 +20,7 @@ module Services
|
|
20
20
|
special_conditions.each do |k, v|
|
21
21
|
case k
|
22
22
|
when :order
|
23
|
+
next unless v
|
23
24
|
order = case v
|
24
25
|
when 'random' then 'RANDOM()'
|
25
26
|
when /\./ then v
|
data/lib/services/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: services
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manuel Meurer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|