Skip to content

Instantly share code, notes, and snippets.

@danlynn
Created January 20, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danlynn/06e2b30228e62c4cb168 to your computer and use it in GitHub Desktop.
Save danlynn/06e2b30228e62c4cb168 to your computer and use it in GitHub Desktop.
# test failed create due to validation
require 'awesome_print' # support 'ap'
sli = nil
Octopus.using(LassoDbSharding.key(ShoppingListItem, Retailer.find(767))) do
ap sli = ShoppingListItem.create()
ap sli.errors
end
@danlynn
Copy link
Author

danlynn commented Jan 20, 2015

The trick is to force the execution within the using() block.

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