app/models/user.rb
Class User
has 24 methods (exceeds 20 allowed). Consider refactoring. Open
Open
class User < ApplicationRecord
encrypts :pupil_password
belongs_to :school, optional: true
belongs_to :staff_role, optional: true
Method admin_user_export_csv
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def self.admin_user_export_csv
CSV.generate do |csv|
csv << [
'School Group',
'School',