base on ruby on rails tutorail