我需要以 json 格式加入并从三个表中获取结果
@employee = Employee.joins(:salary,:personal_info).select("salary.*,personal_info.*) --> This works fine
@employee = Employee.joins(:salary,:personal_info,:loan).select("salary.*,personal_info.*,loan.*) --> only salary and personal_info is coming
format.json { render json: @employee, serializer: EmployeeSerializer, :root => 'employee'}