updating active records and active relations