I'm using the following code in the view which I got from
http://www.igvita.com/2006/10/20/adding-social-bookmarks-in-rails/
But I get the following error:
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 = {
============
When I replace with this
current_uri = u(request.protocol << request.host_with_port << request.request_uri)
The frozen string error is gone but the link is not parsed. i.e. the link is rendered as follows:
http://digg.com/submit?phase=2&url={{url}}&title={{url_encoded_title}}
Well, I asked at the comment of the article, but couldn't get any reply. So, I'm asking it here.
Thanks