I have an ActiveRecord class which I extended with a method that returns an array of strings as categories.
One string has a special character in it.
When the class is used there is an error:
parse error, unexpected tCONSTANT, expecting ']'
When the special character is removed or replaced by ue everything works fine.
Part of the code:
def rubriken
rubriken=
[
["Grundstücke","Grundstücke"]
]
end
I have an ActiveRecord class which I extended with a method that returns an array of strings as categories.
One string has a special character in it.
When the class is used there is an error:
parse error, unexpected tCONSTANT, expecting ']'
When the special character is removed or replaced by ue everything works fine.
Part of the code:
def rubriken
rubriken=
[
["Grundstücke","Grundstücke"]
]
end
The source file itself is encoded in utf-8.
Any ideas ?
Have you tried using "Grundst\232cke" instead of "Grundstücke"?
Michael,
I did it with \u00F6 and after your post with \232 instead of the ü.
The code runs then, but in the select box in the view file there is an ? shown. The view rhtml has a metatag requesting utf-8.
···
Have you tried using "Grundst\232cke" instead of "Grundstücke"?