Change a value in params hash before saving it?

前端 未结 0 1692
不思量自难忘°
不思量自难忘° 2020-12-18 17:31

For some reason, this isn\'t working

user_params[:height] = user_params[:height].to_i * 100
User.new(user_params)

It just saves the "hei

相关标签:
回答
  • 消灭零回复
提交回复
热议问题