I have this controller
def mymethod
@theparam => (params[:valueoftheparam])
@theparam => "3"
callothermethodthatusetheparam
end
So basically, I have “valueoftheparam” which is “2”.
I need to change the value of “2” into “3”, and let “callothermethodthatusetheparam” the new param (which is “3”)
however, “callothermethodthatusetheparam” in the end still used the old value(“2”).
How I can change this value in the controller, and let “callothermethodthatusetheparam” to use the new param value?
Thank you!
You have to modify the value directly, the instance variable does not point to the param, it just clones its value