gist for Active Record issues [Neeraj Singh & Xavier Noria]

This commit closes issue #9775.