Scopes, lambda and rails 3
问题 having a play with scopes tonight in rails 3, and trying to get my head around what lambda does? What I am trying to achieve in this example is get a list of country names (:name) from my countries model which is associated with my recipe model. A recipe belongs_to country and a country has many recipes. I would like to order the recipes by amount of times they appear in a recipe, starting with the highest.. So i am trying this in my recipe model ( or should I do it within the country model?,