Skip to content

Instantly share code, notes, and snippets.

@neumino
Created September 5, 2014 22:31
Show Gist options
  • Save neumino/c7cd56479700fd01f035 to your computer and use it in GitHub Desktop.
Save neumino/c7cd56479700fd01f035 to your computer and use it in GitHub Desktop.
r.db('test').table('foo').update(function(doc) {
return doc.merge({foo: {channel: doc("id").add(doc("name")) }})
})
@neumino
Copy link
Author

neumino commented Sep 5, 2014

@cultofmetatron -- the string concatenation is done on the server, so you must use a ReQL term to perform it.

If you replace

channel: name + '_error_' + user('id'),

with

channel: r.expr(name).add('_error_').add(user('id')),

(and the same for _success), it should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment