Understanding rails