1. 20 6月, 2015 1 次提交
    • S
      Use `Enumerable#sum` on `ActiveRecord::Relation` when a block is given · 7d14bd3f
      Sean Griffin 提交于
      This matches our behavior in other cases where useful enumerable methods
      might have a different definition in `Relation`. Wanting to actually
      enumerate over the records in this case is completely reasonable, and
      wanting `.sum` is reasonable for the same reason it is on `Enumerable`
      in the first place.
      7d14bd3f
  2. 19 6月, 2015 1 次提交
  3. 17 6月, 2015 2 次提交
  4. 16 6月, 2015 2 次提交
    • A
      Small refactor on db:reset · 68f6d534
      Arthur Neves 提交于
      db:reset should not prematurely load the environment, so, for instance,
      if there is any initializer that touches th DB, it will not touch that
      before droping it.
      
      Also this makes the code simpler.
      
      This changed was made back in 15fb4302
      , not sure why. But I am pretty much sure we should do it like this, as
      drop and setup should load its dependencies tasks if necessary.
      68f6d534
    • R
      A few documentation edits [ci skip] · a023d539
      Robin Dupret 提交于
      a023d539
  5. 15 6月, 2015 2 次提交
  6. 14 6月, 2015 3 次提交
  7. 13 6月, 2015 5 次提交
  8. 12 6月, 2015 6 次提交
  9. 11 6月, 2015 3 次提交
  10. 10 6月, 2015 1 次提交
  11. 07 6月, 2015 2 次提交
  12. 05 6月, 2015 2 次提交
    • S
      Return a `Point` object from the PG Point type · 9f4a3fd7
      Sean Griffin 提交于
      This introduces a deprecation cycle to change the behavior of the
      default point type in the PostgreSQL adapter. The old behavior will
      continue to be available for the immediate future as `:legacy_point`.
      
      The current behavior of returning an `Array` causes several problems,
      the most significant of which is that we cannot differentiate between an
      array of points, and a point itself in the case of a column with the
      `point[]` type.
      
      The attributes API gives us a reasonable way to have a proper
      deprecation cycle for this change, so let's take advantage of it. If we
      like this change, we can also add proper support for the other geometric
      types (line, lseg, box, path, polygon, and circle), all of which are
      just aliases for string today.
      
      Fixes #20441
      9f4a3fd7
    • V
  13. 04 6月, 2015 1 次提交
    • G
      Apply Active Record suppression to all saves · ac002395
      George Claghorn 提交于
      It was not being applied to creates and updates attempted through the
      non-bang save methods. This means that, for example, creation of
      records for singular associations through the `create_*` methods was
      not appropriately ignored in .suppress blocks.
      ac002395
  14. 03 6月, 2015 1 次提交
    • R
      [ci skip] fix the `collection.clear` guide · efa1648f
      Roque Pinel 提交于
      Improve the guide about `has_many` `collection.clear` to indicate
      the behavior for each dependent strategy according to
      `collection.delete_all`.
      
      Based on #17179, I changed the `collection.delete` docs to also
      clarify the default strategy for each `hm` and `hm:t` associations.
      
      Fixes #20170.
      efa1648f
  15. 02 6月, 2015 2 次提交
  16. 01 6月, 2015 2 次提交
    • M
      Fixed typos in guide · 81458805
      manish-shrivastava 提交于
      81458805
    • Y
      Map :bigint as NUMBER(19) sql_type by using `:limit => 19` for Oracle · a9e6e6e0
      Yasuo Honda 提交于
      since NUMBER(8) is not enough to store the maximum number of bigint.
      Oracle NUMBER(p,0) as handled as integer
      because there is no dedicated integer sql data type exist in Oracle database.
      
      Also NUMBER(p,s) precision can take up to 38. p means the number of digits, not the byte length.
      bigint type needs 19 digits as follows.
      
      	$ irb
      	2.2.2 :001 > limit = 8
      	 => 8
      	2.2.2 :002 > maxvalue_of_bigint = 1 << ( limit * 8 - 1)
      	 => 9223372036854775808
      	2.2.2 :003 > puts maxvalue_of_bigint.to_s.length
      	19
      	 => nil
      	2.2.2 :004 >
      a9e6e6e0
  17. 31 5月, 2015 4 次提交