I have a very common trouble in ruby 1.9.2 and rails 3.0.9 – incompatible character encodings: UTF-8 and ASCII-8BIT exception. It is raised when i use thinking_sphinx search.
def result
#return page(1).per(1) #no any exceptions
return search('').page(1).per(1) #if I use this an exception is raised when i try to render partial
end
Then the result of this method is used in the partial
render Trademarks.result
I use both erb and haml (makeup man use html, and I prefer to use haml), but it's allowed by haml referrence.
I've tried magic comments, default_internal, external and some other advices, but with no results. Any ideas?