1. 27 4月, 2012 6 次提交
  2. 26 4月, 2012 2 次提交
  3. 14 4月, 2012 1 次提交
  4. 12 3月, 2012 2 次提交
  5. 27 1月, 2012 1 次提交
    • P
      Fix regression from Rails 3.1 · 7b9baeed
      Paul McMahon 提交于
      Under Rails 3.1, you were allowed to pass a hash to a find_or_create
      method with multiple attribute names, but this was broken as the
      arguments were being improperly validated.
      7b9baeed
  6. 17 1月, 2012 2 次提交
  7. 29 12月, 2011 1 次提交
  8. 30 11月, 2011 1 次提交
  9. 15 11月, 2011 2 次提交
  10. 09 11月, 2011 1 次提交
  11. 07 9月, 2011 1 次提交
  12. 05 9月, 2011 2 次提交
  13. 11 8月, 2011 1 次提交
  14. 18 7月, 2011 1 次提交
    • P
      Raise an ArgumentError if user passing less number of argument in the dynamic finder · 6e699499
      Prem Sichanugrist 提交于
      The previous behavior was unintentional, and some people was relying on it. Now the dynamic finder will always expecting the number of arguments to be equal or greater (so you can still pass the options to it.)
      
      So if you were doing this and expecting the second argument to be nil:
      
          User.find_by_username_and_group("sikachu")
      
      You'll now get `ArgumentError: wrong number of arguments (1 for 2).` You'll then have to do this:
      
          User.find_by_username_and_group("sikachu", nil)
      6e699499
  15. 09 7月, 2011 2 次提交
  16. 07 6月, 2011 1 次提交
  17. 05 6月, 2011 1 次提交
    • J
      Refactor Active Record test connection setup. Please see the... · 253bb6b9
      Jon Leighton 提交于
      Refactor Active Record test connection setup. Please see the RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
      253bb6b9
  18. 09 5月, 2011 1 次提交
    • N
      Fix for #371 · 92c10760
      Nick Howard 提交于
      if a query contains a limit or an offset, ActiveRecord::FinderMethods#find_last had inconsistent behavior.
      
      If the records were loaded, it returned the last record in the cached list.
      If they were not, it reversed the order of the query and changed the limit to one.
      If the earlier limit was less than the total matching the query in the db,
      it would return a different record than if the records had been cached.
      
      This commit changes find_last so that it loads the records when getting the
      last record on a query containing a limit or an offset, which makes the behavior consistent.
      92c10760
  19. 30 4月, 2011 2 次提交
  20. 15 4月, 2011 1 次提交
    • J
      Return nil from read_attribute(:foo) if 'foo' is not present in the... · 65469a6e
      Jon Leighton 提交于
      Return nil from read_attribute(:foo) if 'foo' is not present in the @attributes hash, but the _foo method has been defined. This brings the behaviour into line with the 3-0-stable branch and the master branch before 93641ed6 (there were previously no assertions about this which is why the change slipped through). Note that actually calling the 'foo' method will still raise an error if the attribute is not present.
      65469a6e
  21. 30 3月, 2011 3 次提交
  22. 29 3月, 2011 1 次提交
  23. 25 3月, 2011 1 次提交
  24. 26 12月, 2010 1 次提交
  25. 17 11月, 2010 1 次提交
  26. 13 11月, 2010 1 次提交