ruby gated objects: setting properties from js