- 03 8月, 2016 15 次提交
-
-
由 monmon 提交于
-
由 Rafael França 提交于
Avoid duplicated `set_inverse_instance` for target scope
-
由 Kasper Timm Hansen 提交于
Add documentation for ActiveSupport::StringInquirer [ci skip]
-
由 kyatul 提交于
-
由 Ryuta Kamizono 提交于
Because `scope` (`target_scope`) is a `AssociationRelation`. `AssociationRelation` handles `set_inverse_instance`. https://github.com/rails/rails/blob/v5.0.0/activerecord/lib/active_record/association_relation.rb#L31-L33 See also #26022.
-
由 David Heinemeier Hansson 提交于
Add retry_on/discard_on for better exception handling
-
由 David Heinemeier Hansson 提交于
-
由 David Heinemeier Hansson 提交于
-
由 Kasper Timm Hansen 提交于
Remove unnecessary `set_inverse_instance` in finder methods
-
由 Rafael Mendonça França 提交于
Some Rails core members agreed to continue to maintain 4.2 until 5.1 is released. [ci skip]
-
由 David Heinemeier Hansson 提交于
-
由 David Heinemeier Hansson 提交于
-
由 Akira Matsuda 提交于
-
由 Arthur Neves 提交于
-
由 Vijay Dev 提交于
-
- 02 8月, 2016 14 次提交
-
-
由 Kasper Timm Hansen 提交于
Screwed up both the left and right hand sides!
-
由 Kasper Timm Hansen 提交于
The tests were written with the common false value seen in Rails apps, show that intent in the code. Should also fix the build on 5-0-stable.
-
由 Kasper Timm Hansen 提交于
Looked odd, so completely detached from the other necessary part of the implementation.
-
由 Kasper Timm Hansen 提交于
The coder that Psych passes in has a `tag` method we can use to detect which serialization format we're reviving for. Use it and make it clearer alongside the `load_tags` fiddling.
-
由 Kasper Timm Hansen 提交于
If we were to serialize an `ActionController::Parameters` on Psych 2.0.8, we'd get: ```yaml --- !ruby/hash:ActionController::Parameters key: :value ``` Because 2.0.8 didn't store instance variables, while 2.0.9 did: https://github.com/tenderlove/psych/commit/8f84ad0fc711a82a1040def861cb121e8985fd4c That, coupled with 2.0.8 calling `new` instead of `allocate` meant parameters was deserialized just fine: https://github.com/tenderlove/psych/commit/af308f8307899cb9e1c0fffea4bce3110a1c3926 However, if users have 2.0.8 serialized parameters, then upgrade to Psych 2.0.9+ and Rails 5, it would start to blow up because `initialize` will never be called, and thus `@parameters` will never be assigned. Hello, `NoMethodErrors` on `NilClass`! :) To fix this we register another variant of the previous serialization format and take it into account in `init_with`. I've tested this in our app and previously raising code now deserializes like a champ. I'm unsure how to test this in our suite because we use Psych 2.0.8 and don't know how to make us use 2.0.9+ for just one test.
-
由 Kasper Timm Hansen 提交于
Make Parameters support legacy YAML encodings.
-
由 Ryuta Kamizono 提交于
Because `scope` (`target_scope`) is a `AssociationRelation`. `AssociationRelation` handles `set_inverse_instance`. https://github.com/rails/rails/blob/v5.0.0/activerecord/lib/active_record/association_relation.rb#L31-L33
-
由 David Heinemeier Hansson 提交于
-
由 David Heinemeier Hansson 提交于
-
由 David Heinemeier Hansson 提交于
-
由 David Heinemeier Hansson 提交于
-
由 David Heinemeier Hansson 提交于
Let’s do it when we actually execute instead. Then the tests dealing with comparable serializations won’t fail either!
-
由 Kasper Timm Hansen 提交于
By changing ActionController::Parameter's superclass, Rails 5 also changed the YAML serialization format. Since YAML doesn't know how to handle parameters it would fallback to its routine for the superclass, which in Rails 4.2 was Hash while just Object in Rails 5. As evident in the tags YAML would spit out: 4.2: !ruby/hash-with-ivars:ActionController::Parameters 5.0: !ruby/object:ActionController::Parameters Thus when loading parameters YAML from 4.2 in Rails 5, it would parse a hash dump as it would an Object class. To fix this we have to provide our own `init_with` to be aware of the past format as well as the new one. Then we add a `load_tags` mapping, such that when the YAML parser sees `!ruby/hash-with-ivars:ActionController::Parameters`, it knows to call our `init_with` function and not try to instantiate it as a normal hash subclass.
-
由 Sean Griffin 提交于
Remove unnecessary methods for `NullRelation`
-
- 01 8月, 2016 4 次提交
-
-
由 Santiago Pastorino 提交于
remove unnecessary require and extend
-
由 Kasper Timm Hansen 提交于
Suppress warnings
-
由 Kasper Timm Hansen 提交于
remove old links from debugging guide [ci skip]
-
由 yuuji.yaginuma 提交于
-
- 31 7月, 2016 2 次提交
-
-
由 yuuji.yaginuma 提交于
`rack/test` is require at the top of file. https://github.com/rails/rails/blob/master/railties/test/railties/engine_test.rb#L3 In addtion, `Rack::Test::Methods` is include in class, extend is unnecessary. https://github.com/rails/rails/blob/master/railties/test/railties/engine_test.rb#L9
-
- 30 7月, 2016 5 次提交
-
-
由 David Heinemeier Hansson 提交于
-
由 David Heinemeier Hansson 提交于
-
由 David Heinemeier Hansson 提交于
Revert "Adds `not_in?` onto Object"
-
由 David Heinemeier Hansson 提交于
-
由 David Heinemeier Hansson 提交于
-