couchbase-model-relationship 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -192,7 +192,9 @@ module Couchbase
|
|
192
192
|
def raw_new(id, results)
|
193
193
|
obj, flags, cas = results
|
194
194
|
obj = {:raw => obj} unless obj.is_a?(Hash)
|
195
|
-
new({:id => id, :meta => {'flags' => flags, 'cas' => cas}}.merge(obj))
|
195
|
+
new({:id => id, :meta => {'flags' => flags, 'cas' => cas}}.merge(obj)).tap do |instance|
|
196
|
+
instance.send :clean!
|
197
|
+
end
|
196
198
|
end
|
197
199
|
end
|
198
200
|
end
|
data/spec/parent_spec.rb
CHANGED
@@ -213,7 +213,10 @@ describe "parent" do
|
|
213
213
|
|
214
214
|
parent = subject.find_with_children("parent:1")
|
215
215
|
parent.name.should eq("abc")
|
216
|
+
parent.should_not be_changed
|
217
|
+
|
216
218
|
parent.child.age.should eq(5)
|
219
|
+
parent.child.should_not be_changed
|
217
220
|
end
|
218
221
|
|
219
222
|
it "finds and returns all the proper objects" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: couchbase-model-relationship
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-07-
|
12
|
+
date: 2013-07-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|
@@ -218,7 +218,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
218
218
|
version: '0'
|
219
219
|
segments:
|
220
220
|
- 0
|
221
|
-
hash:
|
221
|
+
hash: -2309961730400853989
|
222
222
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
223
223
|
none: false
|
224
224
|
requirements:
|
@@ -227,7 +227,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
227
227
|
version: '0'
|
228
228
|
segments:
|
229
229
|
- 0
|
230
|
-
hash:
|
230
|
+
hash: -2309961730400853989
|
231
231
|
requirements: []
|
232
232
|
rubyforge_project:
|
233
233
|
rubygems_version: 1.8.24
|