Methods
Instance Public methods
after_create(user)
Link
Source: show
# File app/observers/user_observer.rb, line 2 def after_create(user) log_info("User \"#{user.name}\" (#{user.email}) was created") Notify.new_user_email(user.id, user.password).deliver end
after_destroy(user)
Link
Source: show
# File app/observers/user_observer.rb, line 8 def after_destroy user log_info("User \"#{user.name}\" (#{user.email}) was removed") end
after_save(user)
Link
Source: show
# File app/observers/user_observer.rb, line 12 def after_save user if user.username_changed? if user.namespace user.namespace.update_attributes(path: user.username) else user.create_namespace!(path: user.username, name: user.username) end end end
Instance Protected methods