Rails Intermidiate class