Skip to content

Instantly share code, notes, and snippets.

@danlynn
Created January 20, 2015 14:17
Show Gist options
  • Select an option

  • Save danlynn/06e2b30228e62c4cb168 to your computer and use it in GitHub Desktop.

Select an option

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

danlynn commented Jan 20, 2015

Copy link
Copy Markdown
Author

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