Refactor rails recipes