rails 5 обесценивающие сообщения "ПРЕДУПРЕЖДЕНИЕ О УСТАРЕВАНИИ: поведение`change` внутри обратных вызовов будет меняться в следующей версии Rails"

Модернизированная версия рельсов до 5..

object.save в консоли /rspec вызывают много сообщений об устаревании. Вот некоторые из них:

DEPRECATION WARNING: The behavior of `changed` inside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method after `save` returned (e.g. the opposite of what it returns now). To maintain the current behavior, use `saved_changes.keys` instead. (called from block ******)
DEPRECATION WARNING: The behavior of `changed_attributes` inside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method after `save` returned (e.g. the opposite of what it returns now). To maintain the current behavior, use `saved_changes.transform_values(&:first)` instead. (called from block ******)
DEPRECATION WARNING: The behavior of `changes` inside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method after `save` returned (e.g. the opposite of what it returns now). To maintain the current behavior, use `saved_changes` instead. (called from block ******)
DEPRECATION WARNING: The behavior of `attribute_change` inside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method after `save` returned (e.g. the opposite of what it returns now). To maintain the current behavior, use `saved_change_to_attribute` instead. (called from block ******)

Есть ли способ найти причину этих сообщений об устаревании?

Я пытался вырвать драгоценный камень, но без особого успеха..

НЕТ before_ или же after_ обратные вызовы в классе объекта..

0 ответов

Другие вопросы по тегам