rufus-doric 0.1.12 → 0.1.13

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.
data/CHANGELOG.txt CHANGED
@@ -2,6 +2,11 @@
2
2
  = rufus-doric CHANGELOG.txt
3
3
 
4
4
 
5
+ == rufus-doric - 0.1.13 released 2010/05/21
6
+
7
+ - fixed issue with model and missing association
8
+
9
+
5
10
  == rufus-doric - 0.1.12 released 2010/05/20
6
11
 
7
12
  - implemented Model#save. Thanks Claudio !
@@ -500,7 +500,9 @@ module Doric
500
500
 
501
501
  return super unless self.respond_to?(id_method)
502
502
 
503
- klass.find(self.send(id_method))
503
+ id = self.send(id_method)
504
+
505
+ id ? klass.find(id) : nil
504
506
  end
505
507
  end
506
508
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  module Rufus
3
3
  module Doric
4
- VERSION = '0.1.12'
4
+ VERSION = '0.1.13'
5
5
  end
6
6
  end
7
7
 
data/rufus-doric.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rufus-doric}
8
- s.version = "0.1.12"
8
+ s.version = "0.1.13"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["John Mettraux"]
12
- s.date = %q{2010-05-20}
12
+ s.date = %q{2010-05-21}
13
13
  s.description = %q{
14
14
  something at the intersection of Rails3, CouchDB and rufus-jig
15
15
  }
@@ -98,6 +98,14 @@ class UtModelAssociationsTest < Test::Unit::TestCase
98
98
  assert_equal 'eu', c.region.name
99
99
  end
100
100
 
101
+ def test_nil_region_id
102
+
103
+ c = Customer.find('fred')
104
+ c.region_id = nil
105
+
106
+ assert_equal nil, c.region
107
+ end
108
+
101
109
  def test_customer
102
110
 
103
111
  o = Order.find('a')
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 12
9
- version: 0.1.12
8
+ - 13
9
+ version: 0.1.13
10
10
  platform: ruby
11
11
  authors:
12
12
  - John Mettraux
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-20 00:00:00 +09:00
17
+ date: 2010-05-21 00:00:00 +09:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency