I have a Ruby object and I want to use that object in JavaScript. I haven't seen that type of thing, but I want a Ruby object in my .js file.
Is this possible? Thanks in advance
You can't use Ruby objects within JavaScript because Ruby code executes on the server and JavaScript executes within the client Web browser. However, you can execute Ruby code and then use the results within JavaScript as Mark illustrates in his answer to your question.