add demo code for Ruby on Rails implementation