1. 01 2月, 2016 5 次提交
  2. 31 1月, 2016 8 次提交
  3. 30 1月, 2016 9 次提交
  4. 28 1月, 2016 4 次提交
  5. 27 1月, 2016 3 次提交
  6. 26 1月, 2016 2 次提交
  7. 25 1月, 2016 3 次提交
  8. 24 1月, 2016 2 次提交
    • P
      Pare back default `index` option for the migration generator · 909818b9
      Prathamesh Sonpatki 提交于
      - Using `references` or `belongs_to` in migrations will always add index
        for the referenced column by default, without adding `index:true` option
        to generated migration file.
      - Users can opt out of this by passing `index: false`.
      - Legacy migrations won't be affected by this change. They will continue
        to run as they were before.
      - Fixes #18146
      909818b9
    • A
      Add environment back to db:structure:load · 83d2c39d
      Andrew White 提交于
      Because of the changes in #22967 the assumption in #18907 is no longer
      true because the internal metadata feature for Active Record requires
      a working environment.
      83d2c39d
  9. 23 1月, 2016 4 次提交
    • 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
    • A
      Eliminate instance level writers for class accessors · 4642d68d
      Aaron Patterson 提交于
      Instance level writers can have an impact on how the Active Model /
      Record objects are saved.  Specifically, they can be used to bypass
      validations.  This is a problem if mass assignment protection is
      disabled and specific attributes are passed to the constructor.
      
      CVE-2016-0753
      4642d68d
    • A
      Don't short-circuit reject_if proc · 0fde6f55
      Andrew White 提交于
      When updating an associated record via nested attribute hashes the
      reject_if proc could be bypassed if the _destroy flag was set in the
      attribute hash and allow_destroy was set to false.
      
      The fix is to only short-circuit if the _destroy flag is set and the
      option allow_destroy is set to true. It also fixes an issue where
      a new record wasn't created if _destroy was set and the option
      allow_destroy was set to false.
      
      CVE-2015-7577
      0fde6f55
    • J
      82dc7786