updated rails example