0
我正在做移植軌3.0.5到3.2.3,並且還改變了紅寶石 版本從1.8.7到1.9.3。我正在越來越多的方法問題在compute_public_path模塊`ActionView :: Helpers :: AssetTagHelper'
我想重寫方法 compute_public_path(ActionView :: Helpers :: AssetTagHelper)。
現在我在遷移應用程序(3.2.3)時出現此錯誤。
alias_method': undefined method
compute_public_path '的模塊 `::的ActionView ::助手AssetTagHelper'(NameError)
請給我您的寶貴建議上述問題。
我已經做了小程序。它工作完美。
class String
alias_method :old_to_s, :to_s
def to_s
if self=="one"
"coming if "
else
"coming else"
end
end
end
str = String.new("one")
p str.to_s
p str.old_to_s
感謝您的幫助 – user1415139
如果作品,不foget接受響應 –