1. 28 11月, 2017 13 次提交
    • R
      Merge pull request #31248 from y-yagi/fix_31245 · 9aed61f5
      Rafael França 提交于
      Include migration files in gem
      9aed61f5
    • Y
      Include migration files in gem · acaa0795
      yuuji.yaginuma 提交于
      Fixes #31245
      acaa0795
    • S
      Change how `AttributeSet::Builder` receives its defaults · 95b86e57
      Sean Griffin 提交于
      There are two concerns which are both being combined into one here, but
      both have the same goal. There are certain attributes which we want to
      always consider initialized. Previously, they were handled separately.
      The primary key (which is assumed to be backed by a database column)
      needs to be initialized, because there is a ton of code in Active Record
      that assumes `foo.id` will never raise. Additionally, we want attributes
      which aren't backed by a database column to always be initialized, since
      we would never receive a database value for them.
      
      Ultimately these two concerns can be combined into one. The old
      implementation hid a lot of inherent complexity, and is hard to optimize
      from the outside. We can simplify things significantly by just passing
      in a hash.
      
      This has slightly different semantics from the old behavior, in that
      `Foo.select(:bar).first.id` will return the default value for the
      primary key, rather than `nil` unconditionally -- however, the default
      value is always `nil` in practice.
      95b86e57
    • R
      Drop mysql2 version less than 0.4.3 to guarantee fork safety (#31244) · 924a368f
      Ryuta Kamizono 提交于
      Since #31173, mysql2 adapter depends on `automatic_close` which is
      introduced since mysql2 0.4.3. So the adapter with the mysql2 version
      before doesn't work with fork now.
      
      ```
      % ARCONN=mysql2 be ruby -w -Itest test/cases/connection_adapters/connection_handler_test.rb -n test_forked_child_doesnt_mangle_parent_connection
      Using mysql2
      Run options: -n test_forked_child_doesnt_mangle_parent_connection --seed 19988
      
      /Users/kamipo/src/github.com/rails/rails/activerecord/lib/active_record/connection_adapters/mysql2_adapter.rb:108:in `discard!': undefined method `automatic_close=' for #<Mysql2::Client:0x00007fedaa91dfd0> (NoMethodError)
      ```
      
      This drops mysql2 version less than 0.4.3 to guarantee fork safety.
      924a368f
    • R
      Merge pull request #31243 from ignat-z/patch-1 · c22ec971
      Rafael França 提交于
      [ci skip] Fix documentation for deprecation method_wrappers
      c22ec971
    • R
      Add releases notes to the guides index · 052620e0
      Rafael Mendonça França 提交于
      052620e0
    • R
      Preparing for 5.2.0.beta1 release · cceeeb6e
      Rafael Mendonça França 提交于
      cceeeb6e
    • R
      Merge pull request #31242 from fgo/patch-22 · 5fb36d03
      Rafael França 提交于
      Update Rails on Rack guide [ci skip]
      5fb36d03
    • I
      [ci skip] Fix documentation for deprecation method_wrappers · 7d35a59e
      Ignat Zakrevsky 提交于
      Seems like version with class methods doesn't work. 
      
      ```ruby
      require "active_support/deprecation.rb"
      
      module Fred
        extend self
      
        def aaa; end
        def bbb; end
        def ccc; end
        def ddd; end
        def eee; end
      end
      
      ActiveSupport::Deprecation.deprecate_methods(Fred, :aaa, bbb: :zzz, ccc: 'use Bar#ccc instead')
      Fred.aaa
      Fred.bbb
      Fred.ccc
      ```
      # produces nothing
      
      vs
      
      ```ruby
      require "active_support/deprecation.rb"
      
      class Fred
        def aaa; end
        def bbb; end
        def ccc; end
        def ddd; end
        def eee; end
      end
      
      ActiveSupport::Deprecation.deprecate_methods(Fred, :aaa, bbb: :zzz, ccc: 'use Bar#ccc instead')
      Fred.new.aaa
      Fred.new.bbb
      Fred.new.ccc
      ```
      
      produces
      
      ```
      DEPRECATION WARNING: aaa is deprecated and will be removed from Rails 5.2 (called from <main> at deprications.rb:15)
      DEPRECATION WARNING: bbb is deprecated and will be removed from Rails 5.2 (use zzz instead) (called from <main> at deprications.rb:16)
      DEPRECATION WARNING: ccc is deprecated and will be removed from Rails 5.2 (use Bar#ccc instead) (called from <main> at deprications.rb:17)
      ```
      7d35a59e
    • F
      Update Rails on Rack guide [ci skip] · 9cb7c90c
      Francis Go 提交于
      9cb7c90c
    • R
      Update yarn lock · fb09e05b
      Rafael Mendonça França 提交于
      fb09e05b
    • R
      Merge pull request #31237 from prathamesh-sonpatki/5-2-release-notes · f9997e4c
      Rafael França 提交于
      Added first draft of Rails 5.2 release notes [ci skip]
      f9997e4c
    • R
      Make form_with_generates_ids default value to be false · 21cd5b30
      Rafael Mendonça França 提交于
      This will keep the behavior of an application with the defaults of a 4.2
      or 5.0 application behaving the same when upgrading to 5.2.
      21cd5b30
  2. 27 11月, 2017 18 次提交
  3. 26 11月, 2017 9 次提交