- 22 6月, 2014 2 次提交
-
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
-
- 21 6月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
-
- 20 6月, 2014 4 次提交
-
-
由 Yves Senn 提交于
The :singleton-method: directive is printed in the docs. This directive is not necessary as the method is documentable just fine.
-
由 Sean Griffin 提交于
Mostly delegation to start, but we can start moving a lot of behavior in bulk to this object.
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
Now the following case will work fine class Tag < ActiveRecord::Base end class Publisher::Article < ActiveRecord::Base has_and_belongs_to_many :tags end Fixes #15761
-
- 19 6月, 2014 2 次提交
-
-
由 Sean Griffin 提交于
`Type::Integer.new.type_cast('') # => nil`, we do not need a special case to handle this, `nil => ''` already returns false. The only case we need to handle is `0 => 'wibble'` should be changed, while `0 => '0'` should not.
-
由 Josh Sharpe 提交于
-
- 18 6月, 2014 16 次提交
-
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
We're never going to be able to use the attribute object here, however, so let's just accept the ugly demeter violation here for now. Remove test cases which were either redundant with other tests in the file, or were actually testing the type objects (which are tested elsewhere)
-
由 Sean Griffin 提交于
Moves towards removing type casting knowledge from the column entirely
-
由 Sean Griffin 提交于
-
由 Matthew Draper 提交于
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
Also takes a step towards supporting types which use a character other than ',' for the delimiter (`box` is the only built in type for which this is the case)
-
由 Sean Griffin 提交于
If we want to have type decorators mess with the attribute, but not the column, we need to stop type casting on the column. Where possible, we changed the tests to test the value of `column_defaults`, which is public API. `Column#default` is not.
-
由 Sean Griffin 提交于
The case where we have a column object, but don't have a type cast method involves type casting the default value when changing the schema. We get one of the column definition structs instead. That is a case that I'm trying to remove overall, but in the short term, we can achieve the same behavior without needing to pass the adapter to the array type by creating a fake type that proxies to the adapter.
-
由 Sean Griffin 提交于
HStore columns come back from the database separated by a comma and a space, not just a comma. We need to mirror that behavior since we compare the two values. Also adds a regression test against JSON to ensure we don't have the same bug there.
-
由 Sean Griffin 提交于
We no longer need to "init changed attributes" from the initializer, either, as there is no longer a case where a given value would differ from the default, but would not already be marked as changed.
-
由 Aditya Kapoor 提交于
-
由 Nat Budin 提交于
-
由 Sean Griffin 提交于
If the through record gets created in an `after_create` hook that is defined before the association is defined (therefore after its `after_create` hook) get saved twice. This ensures that the through records are created only once, regardless of the order of the hooks.
-
- 17 6月, 2014 7 次提交
-
-
由 Sean Griffin 提交于
-
由 Yves Senn 提交于
-
由 Yves Senn 提交于
-
由 Sean Griffin 提交于
This refactoring revealed the need for another form of decoration, which takes a proc to select which it applies to (There's a *lot* of cases where this form can be used). To avoid duplication, we can re-implement the old decoration in terms of the proc-based decoration. The reason we're `instance_exec`ing the matcher is for cases such as time zone aware attributes, where a decorator is defined in a parent class, and a method called in the matcher is overridden by a child class. The matcher will close over the parent, and evaluate in its context, which is not the behavior we want.
-
由 Sean Griffin 提交于
-
由 Aditya Kapoor 提交于
-
由 Sean Griffin 提交于
-
- 16 6月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
Before, calling `size` would only work if it skipped the cache, and would return a different result from the cache, but only if: - The association was previously loaded - Or you called size previously - But only if the size was 0 when you called it This ensures that the counter is appropriately updated in memory.
-
- 15 6月, 2014 1 次提交
-
-
由 Sean Griffin 提交于
to "without replacement"
-
- 14 6月, 2014 6 次提交
-
-
由 Sean Griffin 提交于
We've stopped using it internally, in favor of polymorphism. So should you!
-
由 Akshay Vishnoi 提交于
-
由 Akshay Vishnoi 提交于
-
由 Matthew Draper 提交于
Fixes #15705.
-
由 Sean Griffin 提交于
-
由 Zachary Scott 提交于
This fixes #15496
-