json.extract! @major, :id, :code, :name, :template_major json.school_id @major.school.id json.school_name @major.school.name can_manager = @major.manager?(current_user) || @major.school.manager?(current_user) || current_user.admin_or_business? json.can_manager can_manager