1. 23 1月, 2016 1 次提交
    • S
      Use the database type to deserialize enum · 67c17190
      Sean Griffin 提交于
      This fixes incorrect assumptions made by e991c7b8 that we can assume the
      DB is already casting the value for us. The enum type needs additional
      information to perform casting, and needs a subtype.
      
      I've opted not to call `super` in `cast`, as we have a known set of
      types which we accept there, and the subtype likely doesn't accept them
      (symbol -> integer doesn't make sense)
      
      Close #23190
      67c17190
  2. 22 1月, 2016 2 次提交
    • P
      21f0136f
    • S
      Use bind parameters for ranges in where clauses · 6efb3945
      Sean Griffin 提交于
      This is a similar case to wanting ot use bind params for limit and
      offset. Right now passing a range grows the amount of prepared
      statements in an unbounded fashion. We could avoid using prepared
      statements in that case, similar to what we do with arrays, but there's
      a known number of variants for ranges.
      
      This ends up duplicating some of the logic from Arel for how to handle
      potentially infinite ranges, and that behavior may be removed from Arel
      in the future.
      
      Fixes #23074
      6efb3945
  3. 21 1月, 2016 1 次提交
  4. 20 1月, 2016 5 次提交
  5. 19 1月, 2016 1 次提交
  6. 18 1月, 2016 1 次提交
  7. 16 1月, 2016 1 次提交
    • P
      Fix ActiveRecord::Relation#cache_key for loaded empty collection · 81269254
      Prathamesh Sonpatki 提交于
      - Before this patch if we try to find cache_key of a loaded but empty
        collection it used to give error because of trying to call `updated_at`
        on `nil` value generated by
        `collection.max_by(&timestamp_column).public_send(timestamp_column)`.
      - This commit fixes above error by checking if size is greater than zero
        or not.
      81269254
  8. 15 1月, 2016 9 次提交
  9. 14 1月, 2016 2 次提交
  10. 13 1月, 2016 8 次提交
  11. 12 1月, 2016 6 次提交
  12. 11 1月, 2016 2 次提交
  13. 10 1月, 2016 1 次提交