rails intermediate assignment