fixed ActiveRecord deprecation warning