Lets supose I have a User table, and on this table I have height, weight and result rows.
In a form I input height and weight values and want to multiply those two values and store on the resulta row on database. I was trying something like that
@user = User.new(params[:user])
@result = @user.height * @user.weight
@user.result = @result
But its not working, what am i doing wrong?