module Meroku class User < Meroku::ApplicationRecord include Meroku::Util # Include default devise modules. Others available are: # :confirmable, :lockable, :timeoutable and :omniauthable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable has_many :keys after_create :add_unix_user after_create :install_rvm_for_user def database_password encrypted_password[7..20].gsub(/[^0-9a-z ]/i, '') end end end