Class: User::Lifecycle

Inherits:
Object
  • Object
show all
Defined in:
lib/generators/pbw/templates/lifecycle.rb

Class Method Summary collapse

Class Method Details

.after_login(user) ⇒ Object



9
10
11
# File 'lib/generators/pbw/templates/lifecycle.rb', line 9

def self.(user)
	# do anything that needs to happen immediately after a user logs in
end

.after_signup(user) ⇒ Object



4
5
6
7
# File 'lib/generators/pbw/templates/lifecycle.rb', line 4

def self.(user)
	# do anything that needs to happen immediately after a user signs up
	user.make_superadmin! if Pbw::User.count == 1
end