app/controllers/application_controller.rb
# Logs registration actions with sending an email notification.
Logs registration actions with sending an email notification.
Logs registration actions with sending an email notification .
def log_registration
    if request.post?                                
      log_action(
        "new User signed-up!",
        "Params: #{remove_passwords( params ).inspect}\r\n\r\nUpdated users total: #{User.count}\r\n\r\nCurrent user instance: #{current_user.inspect}"
      )
    elsif request.delete?                           
      log_action(
        "existing User deleted!",
        "Params: #{remove_passwords( params ).inspect}\r\n\r\nUpdated users total: #{User.count}\r\n\r\nCurrent user instance: #{current_user.inspect}"
      )
    end
  end
def log_registration if request . post? log_action ( "new User signed-up!" , "Params: #{remove_passwords( params ).inspect}\r\n\r\nUpdated users total: #{User.count}\r\n\r\nCurrent user instance: #{current_user.inspect}" ) elsif request . delete? log_action ( "existing User deleted!" , "Params: #{remove_passwords( params ).inspect}\r\n\r\nUpdated users total: #{User.count}\r\n\r\nCurrent user instance: #{current_user.inspect}" ) end end
Logs registration actions with sending an email notification.
Logs registration actions with sending an email notification .
# === POST: === # === DELETE: ===