Graphics application with rails and javascript

Hi all,

I'm trying to develop a video annotation application with Rails. First things I need to do is to select a bounding box of an object in a video frame and back it up in my database.

From now I was able to draw some bounding boxes using "javascript" and the "canvas" elements of html5. But I can't figure out how to link my javascript bounding boxes to my rails active record bounding boxes. Inversely, I'd like to draw all stored bounding boxes in the canvas.

Is there any exemple of use of graphics element in rails ? Any tips will be helpfull.

Regards,

Jaonary