Sample and test for Ruby on rails