Module: DevisePasswordExpirable::Schema

Included in:
Orm::ActiveRecord::Schema
Defined in:
lib/devise_password_expirable/schema.rb

Overview

add schema helper for migrations

Instance Method Summary collapse

Instance Method Details

#password_expirableObject

Add last_password_reset columns in the resource’s database table.

Examples

# For a new resource migration: create_table :the_resources do |t|

t.password_expirable

… end

# or if the resource’s table already exists, define a migration and put this in: change_table :the_resources do |t|

t.datetime :last_password_reset

end



19
20
21
# File 'lib/devise_password_expirable/schema.rb', line 19

def password_expirable
  apply_devise_schema :last_password_reset, DateTime
end