active_remote 1.5.1 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/active_remote/persistence.rb +7 -3
- data/lib/active_remote/version.rb +1 -1
- metadata +4 -4
@@ -197,9 +197,11 @@ module ActiveRemote
|
|
197
197
|
# errors from the response.
|
198
198
|
#
|
199
199
|
def create
|
200
|
-
|
200
|
+
# Use the getter here so we get the type casting.
|
201
|
+
new_attributes = attributes
|
202
|
+
new_attributes.delete("guid")
|
201
203
|
|
202
|
-
execute(:create,
|
204
|
+
execute(:create, new_attributes)
|
203
205
|
|
204
206
|
assign_attributes(last_response.to_hash)
|
205
207
|
add_errors_from_response
|
@@ -221,7 +223,9 @@ module ActiveRemote
|
|
221
223
|
# (plus :guid) will be updated. Defaults to all attributes.
|
222
224
|
#
|
223
225
|
def update(attribute_names = @attributes.keys)
|
224
|
-
|
226
|
+
# Use the getter here so we get the type casting.
|
227
|
+
updated_attributes = attributes
|
228
|
+
updated_attributes.slice!(*attribute_names)
|
225
229
|
updated_attributes.merge!("guid" => self[:guid])
|
226
230
|
|
227
231
|
execute(:update, updated_attributes)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_remote
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.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-02-
|
12
|
+
date: 2013-02-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: active_attr
|
@@ -221,7 +221,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
221
221
|
version: '0'
|
222
222
|
segments:
|
223
223
|
- 0
|
224
|
-
hash: -
|
224
|
+
hash: -883417827179456580
|
225
225
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
226
226
|
none: false
|
227
227
|
requirements:
|
@@ -230,7 +230,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
230
230
|
version: '0'
|
231
231
|
segments:
|
232
232
|
- 0
|
233
|
-
hash: -
|
233
|
+
hash: -883417827179456580
|
234
234
|
requirements: []
|
235
235
|
rubyforge_project:
|
236
236
|
rubygems_version: 1.8.24
|