lib/github/sql.rb in github-ds-0.2.3 vs lib/github/sql.rb in github-ds-0.2.4

- old
+ new

@@ -65,9 +65,16 @@ def inspect "<#{self.class.name} #{values.inspect}>" end end + # Public: Run inside a transaction + def self.transaction + ActiveRecord::Base.connection.transaction do + yield + end + end + # Public: Instantiate a literal SQL value. # # WARNING: The given value is LITERALLY inserted into your SQL without being # escaped, so use this with extreme caution. def self.LITERAL(string)