1. 26 2月, 2013 1 次提交
  2. 25 2月, 2013 1 次提交
  3. 21 2月, 2013 3 次提交
  4. 20 2月, 2013 2 次提交
  5. 08 2月, 2013 3 次提交
  6. 25 1月, 2013 1 次提交
  7. 09 12月, 2012 1 次提交
    • C
      Improve where.not docs [ci skip] · 7d42317e
      Carlos Antonio da Silva 提交于
      * Fix example queries
      * Remove doc entries of where.like/not_like.
      * Remove :chain from where.not related docs. To me that's an implementation
        detail and we don't expect people to use where(:chain).not.
      7d42317e
  8. 08 12月, 2012 2 次提交
    • C
      Rollback where.like and where.not_like · 8d02afea
      Carlos Antonio da Silva 提交于
      The real win with these chain methods is where.not, that takes care of
      different scenarios in a graceful way, for instance when the given value
      is nil.
      
          where("author.id != ?", author_to_ignore.id)
          where.not("author.id", author_to_ignore.id)
      
      Both where.like and where.not_like compared to the SQL versions doesn't
      seem to give us that much:
      
          Post.where("title LIKE 'ruby on%'")
          Post.where.like(title: 'ruby on%'")
          Post.where("title NOT LIKE 'ruby on%'")
          Post.where.not_like(title: 'ruby on%'")
      
      Thus Rails is adding where.not, but not where.like/not_like and others.
      8d02afea
    • C
      Document the types of arguments accepted by AR#not · bb53c60f
      claudiob 提交于
      This commit stems from https://github.com/rails/rails/pull/8332#issuecomment-11127957
      
      Since the formats in which conditions can be passed to `not` differ
      from the formats in which conditions can be passed to `like` and `not_like`,
      then I think it's worth adding rdoc and tests to show this behavior
      bb53c60f
  9. 07 12月, 2012 3 次提交
  10. 30 11月, 2012 2 次提交
  11. 10 11月, 2012 1 次提交
  12. 05 11月, 2012 1 次提交
  13. 29 10月, 2012 1 次提交
  14. 16 10月, 2012 1 次提交
  15. 13 10月, 2012 2 次提交
  16. 12 10月, 2012 1 次提交
  17. 05 10月, 2012 2 次提交
  18. 13 9月, 2012 1 次提交
    • J
      Pass in the model class rather than engine · e55c75d2
      Jon Leighton 提交于
      In some circumstances engine was Arel::Table.engine which for separate
      reasons was an ActiveRecord::Model::DeprecationProxy, which caused a
      deprecation warning.
      
      In any case, we want the actual model class here, since we want to use
      it to infer information about associations.
      e55c75d2
  19. 12 9月, 2012 1 次提交
    • B
      Accept belongs_to assoc. keys in ActiveRecord queries · 3da275c4
      beerlington 提交于
      Allows you to specify the model association key in a belongs_to
      relationship instead of the foreign key.
      
      The following queries are now equivalent:
      
      Post.where(:author_id => Author.first)
      Post.where(:author => Author.first)
      
      PriceEstimate.where(:estimate_of_type => 'Treasure', :estimate_of_id => treasure)
      PriceEstimate.where(:estimate_of => treasure)
      3da275c4
  20. 24 8月, 2012 1 次提交
  21. 03 8月, 2012 1 次提交
  22. 31 7月, 2012 1 次提交
  23. 28 7月, 2012 3 次提交
  24. 22 7月, 2012 2 次提交
  25. 17 7月, 2012 2 次提交