devise_suspendable

devise_suspendable is a simple module which uses the [Devise](github.com/plataformatec/devise) authentication framework Activatable module hooks to provide a simple clean way to suspend an account. When an account is suspended the date and time of suspension is recorded, as well as an optional reason, for easy reference.

Setup

(Assumes that you have devise already setup and your device models, e.g. User, are already created)

  1. Add ‘gem devise_suspendable` in your Gemfile

  2. Create a migration to update each of your device model(s), e.g. User, that you want to be suspendable

rails g devise_suspendable User
  1. Run the migration

rake db:migrate
  1. Mark the model as suspendable

class User < ActiveRecord::Base
  devise ..., :activatable, :suspendable
  ...
end

Notes

References

Thanks to

Released under the MIT license

Copyright © 2010, 2011 Josh Kalderimis, Amol Kelkar