我有這樣的控制器軌道改變參數的值在控制器
def mymethod
@theparam => (params[:valueoftheparam])
@theparam => "3"
callothermethodthatusetheparam
end
所以基本上,我有「valueoftheparam」,這是「2」。
我需要將「2」的值更改爲「3」,並且讓「參數設定爲新參數」(即「3」)
然而,「callothermethodthatusetheparam」仍然使用舊值(「2 「)。
我如何在控制器中更改此值,並讓「callothermethodthatusetheparam」使用新的參數值?
謝謝!
超,就像一個魅力 – rahardi 2011-02-16 09:52:28