Skip to content

Instantly share code, notes, and snippets.

@gregblake
Created December 6, 2021 13:32
Show Gist options
  • Save gregblake/c656d2755d82e1d216f7b11ced6e58c5 to your computer and use it in GitHub Desktop.
Save gregblake/c656d2755d82e1d216f7b11ced6e58c5 to your computer and use it in GitHub Desktop.
Error Catching
def new_query(params, current_user)
begin
# existing code from `new_query`
rescue ActiveRecord::StatementInvalid => e
binding.pry
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment