various practice code for ruby on rails