Newbie question on using javascript within rails view

Hi, I am using the MapQuest API and I would like to set the name for the location by using MQLocation.setName("name") ... I have the name in the Order class, order.name ... how can I combine the ruby code in the javascript ?? so something like MQLocation.setName( order.name ) ...