We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What is the alternative of ctx[key] = value that was available in rubyracer?
ctx[key] = value
In rubyracer, the following block would return hi 1
hi 1
ctx = MiniRacer::Context.new person = Person.first ctx[:person] = person ctx.eval("'hi' + person.id")
I have tried the following things:
ctx.attach("person", proc{ person }) [8] pry(#<...>)> ctx.eval("person") => #<MiniRacer::JavaScriptFunction:0x0000000123b1d220> [9] pry(#<...>)> ctx.eval("person.name") => "" [10] pry(#<...>)> ctx.eval("person.id") => nil [11] pry(#<...>)> ctx.eval("person()") => "Undefined Conversion"
What is the correct way to do what I've described above with mini_racer?
Thank you!
edit Not exactly what I need but this kinda works(not for relations though eg person().address)
person().address
ctx.attach("person", proc{person.serializable_hash}) ctx.eval("person().id")
The text was updated successfully, but these errors were encountered:
No branches or pull requests
What is the alternative of
ctx[key] = value
that was available in rubyracer?In rubyracer, the following block would return
hi 1
I have tried the following things:
What is the correct way to do what I've described above with mini_racer?
Thank you!
edit
Not exactly what I need but this kinda works(not for relations though eg
person().address
)The text was updated successfully, but these errors were encountered: