rpc-mapper 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -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 record with :id = #{ids_or_mode}")
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 records with ids (#{ids_or_mode.join(',')}) (expected #{ids_or_mode.size} records but got #{result.size})." unless result.size == ids_or_mode.size
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)
@@ -3,7 +3,7 @@ module RPCMapper
3
3
 
4
4
  MAJOR = 0
5
5
  MINOR = 1
6
- TINY = 3
6
+ TINY = 4
7
7
 
8
8
  def self.to_s # :nodoc:
9
9
  [MAJOR, MINOR, TINY].join('.')
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: 29
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 3
10
- version: 0.1.3
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-10-28 00:00:00 -05:00
18
+ date: 2010-11-03 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency