Permalink
Browse files

Adding sql execution and proper bootstrapping.

  • Loading branch information...
1 parent f3a00ca commit 0845b1c82e18b42d997d169061b186c029a0f177 @nate nate committed Dec 22, 2008
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/bootstrapper.rb
View
@@ -14,7 +14,11 @@ def self.run(key)
def self.truncate_tables(*tables)
tables.each do |table|
- table.to_s.classify.constantize.delete_all
+ sql("delete from #{table}")
end
end
+
+ def self.sql(sql)
+ ActiveRecord::Base.connection.execute(sql)
+ end
end

0 comments on commit 0845b1c

Please sign in to comment.