Szymon Przybył wrote:
[...]
> But it throws undefined local variable or method `partwise' for
> #<MusicxmlController:0xb6badff4>, becouse in symbols names minus sign
> is prohibited. How can I make a symbol name with minus sign?
Well, you can actually have any characters you like in a symbol name.
The :name syntax only works if the symbol name doesn't contain "weird"
characters, but the following syntaxes will work regardless:
:'name-with-weird-characters'
:"name-with-weird-characters-and-#{variable_interpolation}"
...or just use String#to_sym .
We are now well out of Rails territory and into basic Ruby, so further
discussion probably should go to the main Ruby list.
>
> cheers,
> simon
Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.