smidig/conference-app — pull request #41 by badeball (2013-05-30 02:29:53+00:00)
Title: Truncate database before seeding it with new data

Reseeding without truncating the existing database violates a number of constraints, such as that only one user can be registered using one e-mail address. Thus, it makes sense to truncate it before seeding. This also allows one to better control the state of the database during development.

Simply using DatabaseCleaner, which is already installed and used in the test environment.

```ruby
DatabaseCleaner.strategy = :truncation
DatabaseCleaner.clean
```

I am actually surprised that no one has encountered errors regarding this before. I tried looking at the logs, but I couldn't find any related changes. Why this might have worked before is beyond me right now...