Sha256: c5a2a3eb940dfc94bf1b4e862f11ff9df3b39458947b987dcd68fbce1521111a
Contents?: true
Size: 642 Bytes
Versions: 13
Compression:
Stored size: 642 Bytes
Contents
module ThinkFeelDoDashboard module Concerns # is included in the User model and automatically # sets a password on create module Password extend ActiveSupport::Concern # This is perfect for including functionality # provided by 3rd party gems, etc. included do before_validation :set_password, on: :create end # methods added to Class itself... module ClassMethods end private def set_password random_string = SecureRandom.hex(64) self.password = random_string self.password_confirmation = random_string end end end end
Version data entries
13 entries across 13 versions & 1 rubygems