Closed gauda closed 12 years ago
Could you show an example on how to reproduce this error? I've tried a few variations and can't get it failing:
@view.title('someTitle'.freeze)
@view.display_meta_tags(:site => 'someSite').should == '<title>someSite | someTitle</title>'
@view.title(['someTitle'.freeze].freeze)
@view.display_meta_tags(:site => 'someSite').should == '<title>someSite | someTitle</title>'
It is only happening in production mode, and only for some pages. We couldn't figure out what triggers this. The backtrace shows that the error occurs on the line with .map inside normalize title. Maybe rails does some caching for strip_tags or h and freezes the resulting string?
Can you somehow test in production? Maybe with some tags and unescaped html entities in the title.
Added frozen strings in production everywhere. No exceptions. Could you help me to find the problem?
Sorry, I have no idea what to do. Maybe it's one of the other gems or plugins we are using.
Closing issue since, there is no new information. Please re-open or create a new issue if you still having this problem.
got this error in normalize_title(title) line 211 and following in view_helper.rb. to fix it, add title = title.dup if title.frozen? as first line in the function.