- 10 6月, 2014 15 次提交
-
-
由 eileencodes 提交于
Reflection has an available method that is used to check if the reflection is a collection. Any :has_many macro is considered a collection and `collection?` should be used instead of `macro == :has_many`.
-
由 Rafael Mendonça França 提交于
add has_one? method and reuse instead of checking macro
-
由 Aaron Patterson 提交于
Abstract away use of HABTM macro
-
由 eileencodes 提交于
By having the `:has_and_belongs_to_many` macro in the `@collection` we are punishing `:has_many` associations because it has to allocate the array and check the macro. @collection is returned to `macro == :has_many` and a new reflection class `HABTMReflection` is created to handle this case instead.
-
由 eileencodes 提交于
Instead of checking for `macro == :has_one` throughout the codebase we can create a `has_one?` method to match the `belongs_to?`, `polymorphic?` and other methods.
-
由 Rafael Mendonça França 提交于
Before HashWithIndifferentAccess were doing deep_dup of the inner hashes when Hash doesn't do. Now both are behaving in the same way.
-
由 Rafael Mendonça França 提交于
This reverts commit dd3ea171 and add a regression test. Fixes #15418
-
由 Rafael Mendonça França 提交于
Rename `type_cast` to `type_cast_from_database`
-
由 Sean Griffin 提交于
In some cases there is a difference between the two, we should always be doing one or the other. For convenience, `type_cast` is still a private method on type, so new types that do not need different behavior don't need to implement two methods, but it has been moved to private so it cannot be used accidentally.
-
由 Rafael Mendonça França 提交于
Use an actual identity type in AR::Result#identity_type
-
由 Sean Griffin 提交于
We should be able to rely on this object implenting the full type interface.
-
由 Rafael Mendonça França 提交于
Remove workaround for non-lazy serialize in tests
-
由 Rafael Mendonça França 提交于
Make `_before_type_cast` actually be before type cast
-
由 Rafael Mendonça França 提交于
Integration tests are inside protected_attributes test suite. Fixes #15496 Fixes rails/protected_attributes#35
-
由 Sean Griffin 提交于
- The following is now true for all types, all the time - `model.attribute_before_type_cast == given_value` - `model.attribute == model.save_and_reload.attribute` - `model.attribute == model.dup.attribute` - `model.attribute == YAML.load(YAML.dump(model)).attribute` - Removes the remaining types implementing `type_cast_for_write` - Simplifies the implementation of time zone aware attributes - Brings tz aware attributes closer to being implemented as an attribute decorator - Adds additional point of control for custom types
-
- 09 6月, 2014 4 次提交
-
-
由 Rafael Mendonça França 提交于
Remove a long gone :order option from has_one's valid_options
-
由 thedarkone 提交于
-
由 Sean Griffin 提交于
`serialize` is now lazy, so the workaround is no longer needed.
-
由 Yves Senn 提交于
-
- 08 6月, 2014 21 次提交
-
-
由 Rafael Mendonça França 提交于
Mail 2.6.1 silences excessive warnings; remove Gemfile hack
-
由 Benjamin Fleischer 提交于
Completes https://github.com/rails/rails/pull/15493 Revert "For our build, stick with mail 2.5.x for now" This reverts commit b8f586a0.
-
由 Richard Schneeman 提交于
Update migrations.md
-
由 Kalman Hazins 提交于
default column type modifier
-
由 Matthew Draper 提交于
Not sure what's causing them suddenly, but it seems unlikely there's much we can do about it. For the small amount of coverage this particular job gains us, it's hurting us more, by making CI failures unremarkable.
-
由 Yves Senn 提交于
Restore test deliveries for ActionMailer.
-
由 Matthew Draper 提交于
Handle client disconnect during live streaming
-
由 Matthew Draper 提交于
.. even when the producer is blocked for a write.
-
由 Rafael Mendonça França 提交于
Add Additional Test Cases for the constantize
-
由 Aditya Kapoor 提交于
-
由 Rafael Mendonça França 提交于
fix test cases after #15558 merge to master.
-
由 Kuldeep Aggarwal 提交于
-
由 Rafael Mendonça França 提交于
Rename `property` to `attribute` Conflicts: activerecord/lib/active_record/attribute_methods/serialization.rb activerecord/lib/active_record/base.rb
-
由 Rafael Mendonça França 提交于
Don't query the database schema when calling `serialize`
-
由 Rafael Mendonça França 提交于
Ensure time zones don't change after round trip with array columns
-
由 Rafael Mendonça França 提交于
Do not type cast twice on attribute assignment
-
由 Sean Griffin 提交于
The definition of `write_attribute` in dirty checking ultimately leads to the columns calling `type_cast` on the value to perform the comparison. However, this is a potentially expensive computation that we cache when it occurs in `read_attribute`. The only case that we need the non-type-cast form is for numeric, so we pass that through as well (something I'm looking to remove in the future). This also reduces the number of places that manually access various stages in an attribute's type casting lifecycle, which will aid in one of the larger refactorings that I'm working on.
-
由 Rafael Mendonça França 提交于
Correct Example output in Rails guides [ci skip]
-
由 Rafael Mendonça França 提交于
Remove dead branch when restoring ID within a transaction Conflicts: activerecord/lib/active_record/transactions.rb
-
由 Rafael Mendonça França 提交于
Move conditionals about freezing closer to the definition of `freeze`
-
由 Sean Griffin 提交于
Reduces the number of places that care about the internals of how we store and type cast attributes. We do not need to go through the dup/freeze dance, as you couldn't have saved a frozen new record anyway, and that is the only time we would end up modifying the frozen hash.
-