我使用的是我從不能修改凍結串
http://www.igvita.com/2006/10/20/adding-social-bookmarks-in-rails/
得到了視圖下面的代碼,但我得到了以下錯誤:
TypeError in Pages#show
Showing app/views/pages/show.html.erb where line #26 raised:
can’t modify frozen string
Extracted source (around line #26):
23: Twitter
24: Facebook
25:
26: <% current_uri = u(request.protocol << request.host_with_port << request.request_uri)
27: title = u(@title)
28:
29: bookmarklets = {
============
當我用這個替換
current_uri = u(request.protocol << request.host_with_port << request.request_uri)
凍結的字符串錯誤消失了,但鏈接未被解析。即鏈接呈現如下:
http://digg.com/submit?phase=2&url={{url}}&title={{url_encoded_title}}
嗯,我問了文章的評論,但沒有得到任何答覆。所以,我在這裏問。
謝謝