Skip to content

Commit

Permalink
truncation support for SQL Server adapter
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Mabey <ben@benmabey.com>
  • Loading branch information
adzap authored and bmabey committed Aug 4, 2009
1 parent 0870eb9 commit 2548bd7
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/database_cleaner/active_record/truncation.rb
Expand Up @@ -27,6 +27,12 @@ def truncate_table(table_name)
end
end

class SQLServerAdapter
def truncate_table(table_name)
execute("TRUNCATE TABLE #{quote_table_name(table_name)};")
end
end

end
end

Expand Down

0 comments on commit 2548bd7

Please sign in to comment.