converting to rails application