lib/active_remote/rpc.rb in active_remote-7.0.0 vs lib/active_remote/rpc.rb in active_remote-7.1.0

- old
+ new

@@ -9,16 +9,15 @@ include ::ActiveRemote::Serializers::Protobuf end module ClassMethods # Builds an attribute hash that be assigned directly - # to an object from an rpc response + # to an object from an RPC response def build_from_rpc(values) values = values.stringify_keys - attribute_names.inject(_default_attributes.deep_dup) do |attributes, name| + attribute_names.each_with_object(_default_attributes.deep_dup) do |name, attributes| attributes.write_from_database(name, values[name]) - attributes end end # Execute an RPC call to the remote service and return the raw response. #