Fixed broken ActiveRecord call (changed in new version(s))