Я работаю через Rails учебник Майкла Hartl и когда я запускаю мой тестовый пакет я вижу ошибки, как это:предупреждение устаревания в Rails 4 приложения (Hartl учебное пособие)
DEPRECATION WARNING: You attempted to assign a value which is not explicitly
`true` or `false` to a boolean column. Currently this value casts to `false`.
This will change to match Ruby's semantics, and will cast to `true` in Rails
5. If you would like to maintain the current behavior, you should explicitly
handle the values you would like cast to `false`. (called from remember at
.../RoR_Tutorial/sample_app/app/models/user.rb:28)
DEPRECATION WARNING: You attempted to assign a value which is not explicitly
`true` or `false` to a boolean column. Currently this value casts to `false`.
This will change to match Ruby's semantics, and will cast to `true` in Rails
5. If you would like to maintain the current behavior, you should explicitly
handle the values you would like cast to `false`. (called from update at
...RoR_Tutorial/sample_app/app/controllers/users_controller.rb:40)
кажется, сердиться на звонки к update_attribute
, такие как это:
def remember
self.remember_token = User.new_token
update_attribute(:remember_digest, User.digest(remember_token))
end
или
def update
@user = User.find(params[:id])
if @user.update_attributes(user_params)
flash[:success] = 'Profile Updated'
redirect_to @user
else
render 'edit'
end
end
... может ли кто-нибудь уточнить, что это предупреждение пытается мне сказать?