Breakable toy in AngularJS and Ruby on Rails