fixes in active record query for reorder
Merge pull request #15229 from peeyushsingla/master

fixes in active record query for reorder in rails guides