fix for ActiveRecord 3.2.11 relations