fix call to method removed in Rails 4