fix typo in active record querying