enspiral/loomio — pull request #400 by robguthrie (2012-12-03 06:59:30+00:00)
Title: Feature/add token authenticatable to users

This adds an unsubscribe link to daily email summary and proposal closing soon emails.

There is a bit of fucking around with old migration files so that migrations run from scratch.. should not affect production at all.

There is also a change that the default loomio for a new group is not generated in the model anymore because that ruins a lot of tests I want to write, so it now is called from the approve_request! method of GroupRequest

After this is merged we need to run the following code on the production database to give all the users an auth_token:

User.all.each do |user|
user.ensure_authentication_token!
end

I don't think that putting data manipulation stuff into migration files is a good idea.. it always breaks in the end.