rpc-mapper 0.1.3 → 0.1.4
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.
@@ -3,10 +3,10 @@ module RPCMapper::FinderMethods
|
|
3
3
|
def find(ids_or_mode, options={})
|
4
4
|
case ids_or_mode
|
5
5
|
when Fixnum, String
|
6
|
-
self.where(:id => ids_or_mode.to_i).first(options) || raise(RPCMapper::RecordNotFound, "Could not find
|
6
|
+
self.where(:id => ids_or_mode.to_i).first(options) || raise(RPCMapper::RecordNotFound, "Could not find #{@klass} with :id = #{ids_or_mode}")
|
7
7
|
when Array
|
8
8
|
self.where(:id => ids_or_mode).all(options).tap do |result|
|
9
|
-
raise RPCMapper::RecordNotFound, "Couldn't find all
|
9
|
+
raise RPCMapper::RecordNotFound, "Couldn't find all #{@klass} with ids (#{ids_or_mode.join(',')}) (expected #{ids_or_mode.size} records but got #{result.size})." unless result.size == ids_or_mode.size
|
10
10
|
end
|
11
11
|
when :all
|
12
12
|
self.all(options)
|
data/lib/rpc_mapper/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rpc-mapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 4
|
10
|
+
version: 0.1.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Travis Petticrew
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-11-03 00:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|