1. 28 2月, 2013 1 次提交
  2. 26 2月, 2013 1 次提交
  3. 25 2月, 2013 2 次提交
  4. 24 2月, 2013 1 次提交
  5. 21 2月, 2013 3 次提交
  6. 20 2月, 2013 2 次提交
  7. 16 2月, 2013 1 次提交
  8. 10 2月, 2013 1 次提交
  9. 09 2月, 2013 2 次提交
  10. 08 2月, 2013 6 次提交
  11. 07 2月, 2013 1 次提交
  12. 28 1月, 2013 1 次提交
    • J
      Prevent Relation#merge from collapsing wheres on the RHS · c8d88990
      Jon Leighton 提交于
      This caused a bug with the new associations implementation, because now
      association conditions are represented as Arel nodes internally right up
      to when the whole thing gets turned to SQL.
      
      In Rails 3.2, association conditions get turned to raw SQL early on,
      which prevents Relation#merge from interfering.
      
      The current implementation was buggy when a default_scope existed on the
      target model, since we would basically end up doing:
      
        default_scope.merge(association_scope)
      
      If default_scope contained a where(foo: 'a') and association_scope
      contained a where(foo: 'b').where(foo: 'c') then the merger would see
      that the same column is representated on both sides of the merge and
      collapse the wheres to all but the last: where(foo: 'c')
      
      Now, the RHS of the merge is left alone.
      
      Fixes #8990
      c8d88990
  13. 26 1月, 2013 1 次提交
  14. 25 1月, 2013 2 次提交
  15. 18 1月, 2013 3 次提交
  16. 07 1月, 2013 1 次提交
  17. 01 1月, 2013 1 次提交
  18. 30 12月, 2012 1 次提交
  19. 29 12月, 2012 3 次提交
  20. 14 12月, 2012 1 次提交
    • T
      Replace some global Hash usages with the new thread safe cache. · 45448a57
      thedarkone 提交于
      Summary of the changes:
       * Add thread_safe gem.
       * Use thread safe cache for digestor caching.
       * Replace manual synchronization with ThreadSafe::Cache in Relation::Delegation.
       * Replace @attribute_method_matchers_cache Hash with ThreadSafe::Cache.
       * Use TS::Cache to avoid the synchronisation overhead on listener retrieval.
       * Replace synchronisation with TS::Cache usage.
       * Use a preallocated array for performance/memory reasons.
       * Update the controllers cache to the new AS::Dependencies::ClassCache API.
         The original @controllers cache no longer makes much sense after @tenderlove's
         changes in 7b6bfe84 and f345e238.
       * Use TS::Cache in the connection pool to avoid locking overhead.
       * Use TS::Cache in ConnectionHandler.
      45448a57
  21. 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
  22. 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
  23. 07 12月, 2012 2 次提交