Skip to content

Instantly share code, notes, and snippets.

@re5et
Last active December 21, 2015 21:48
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 re5et/6370420 to your computer and use it in GitHub Desktop.
Save re5et/6370420 to your computer and use it in GitHub Desktop.
class ActiveRecord::Base
def self.boolean_returning_transaction
begin
result = false
result = ActiveRecord::Base.transaction do
yield
return true
end
rescue
end
return result
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment