Sometimes logic needs to be shared between the server-side (Ruby) and the client-side (JavaScript). Here I show how to run JavaScript directly in Ruby through ExecJS and therubyracer.
Original source
Sometimes logic needs to be shared between the server-side (Ruby) and the client-side (JavaScript). Here I show how to run JavaScript directly in Ruby through ExecJS and therubyracer.
Original source