Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
| * | | | | Introduce an object to aid in creation and management of `@attributes` | Sean Griffin | 2014-06-19 | 8 | -23/+120 | |
| |/ / / | | | | | | | | | | | | | | | | | Mostly delegation to start, but we can start moving a lot of behavior in bulk to this object. | |||||
* | | | | Merge pull request #15772 from nbudin/sti_through_bug | Rafael Mendonça França | 2014-06-19 | 3 | -1/+18 | |
|\ \ \ \ | | | | | | | | | | | | | | | | Don't include inheritance column in the through_scope_attributes | |||||
| * | | | | Don't include inheritance column in the through_scope_attributes | Nat Budin | 2014-06-17 | 3 | -2/+17 | |
| | |_|/ | |/| | | ||||||
* | | | | Use a better test description | Rafael Mendonça França | 2014-06-19 | 1 | -1/+1 | |
| | | | | ||||||
* | | | | Fix has_and_belongs_to_many in a namespaced model pointing to a non ↵ | Rafael Mendonça França | 2014-06-19 | 4 | -8/+20 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | namespaced model 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 | |||||
* | | | | this method is no longer being used | Josh Sharpe | 2014-06-19 | 1 | -4/+0 | |
| |/ / |/| | | ||||||
* | | | Reconnect after possibly enabling hstore | Matthew Draper | 2014-06-18 | 1 | -0/+2 | |
| | | | ||||||
* | | | Merge pull request #15782 from sgrif/sg-column-defaults | Matthew Draper | 2014-06-18 | 17 | -68/+60 | |
|\ \ \ | | | | | | | | | Don't type cast the default on the column | |||||
| * | | | Don't type cast the default on the column | Sean Griffin | 2014-06-17 | 17 | -68/+60 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. | |||||
* | | | | Detect in-place changes on point types | Sean Griffin | 2014-06-17 | 3 | -3/+31 | |
| | | | | ||||||
* | | | | Enable hstore in array tests | Sean Griffin | 2014-06-17 | 1 | -0/+6 | |
| | | | | ||||||
* | | | | Detect mutations of arrays and array members | Sean Griffin | 2014-06-17 | 3 | -12/+41 | |
| | | | | ||||||
* | | | | Ensure `OID::Array#type_cast_for_database` matches PG's quoting behavior | Sean Griffin | 2014-06-17 | 4 | -7/+54 | |
| | | | | | | | | | | | | | | | | | | | | | | | | 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) | |||||
* | | | | Merge pull request #15778 from sgrif/sg-pg-mutable-arrays | Matthew Draper | 2014-06-18 | 4 | -38/+62 | |
|\ \ \ \ | | | | | | | | | | | Move pg array database type casting to the Array type | |||||
| * | | | | Move array database type casting to the Array type | Sean Griffin | 2014-06-17 | 4 | -38/+62 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. | |||||
* | | | | | Merge pull request #15727 from aditya-kapoor/add-tests-for-migration | Matthew Draper | 2014-06-18 | 1 | -0/+17 | |
|\ \ \ \ \ | |_|/ / / |/| | | | | Add test cases for Migration#inverse_of | |||||
| * | | | | Add test cases for Migration#inverse_of | Aditya Kapoor | 2014-06-17 | 1 | -0/+17 | |
| | |_|/ | |/| | | ||||||
* | | | | Merge pull request #15780 from sgrif/sg-dont-always-save-mutable-types | Rafael Mendonça França | 2014-06-17 | 3 | -2/+4 | |
|\ \ \ \ | | | | | | | | | | | Don't assume that Hstore columns have always changed | |||||
| * | | | | Don't assume that Hstore columns have always changed | Sean Griffin | 2014-06-17 | 3 | -2/+4 | |
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. | |||||
* / | | | Use `column_defaults` in dirty for checking changed defaults | Sean Griffin | 2014-06-17 | 1 | -11/+3 | |
|/ / / | | | | | | | | | | | | | | | | 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. | |||||
* | / | Don't mess with `column_defaults` when optimistic locking is enabled | Sean Griffin | 2014-06-17 | 3 | -12/+32 | |
| |/ |/| | ||||||
* | | add `bin/rake db:purge` task to empty the current database. | Yves Senn | 2014-06-17 | 4 | -0/+55 | |
| | | ||||||
* | | fix typo in test method names. [ci skip] | Yves Senn | 2014-06-17 | 1 | -4/+4 | |
| | | ||||||
* | | Promote time zone aware attributes to a first class type decorator | Sean Griffin | 2014-06-16 | 6 | -32/+57 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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. | |||||
* | | Merge pull request #15759 from sgrif/sg-extract-type-decorator | Rafael Mendonça França | 2014-06-16 | 1 | -8/+24 | |
|\ \ | | | | | | | Refactor application of type decorators into an object | |||||
| * | | Refactor application of type decorators into an object | Sean Griffin | 2014-06-16 | 1 | -8/+24 | |
| | | | ||||||
* | | | [ci skip] add API doc for AR Group. | Aditya Kapoor | 2014-06-17 | 1 | -1/+9 | |
|/ / | ||||||
* | | Refactor in-place dirty checking to use the attribute object | Sean Griffin | 2014-06-16 | 3 | -9/+26 | |
| | | ||||||
* | | Merge pull request #13963 from lucas-clemente/pending_migrations | Rafael Mendonça França | 2014-06-16 | 2 | -5/+58 | |
|\ \ | | | | | | | Skip migration check if adapter doesn't support it | |||||
| * | | skip migration check if adapter doesn't support it | Lucas Clemente | 2014-04-19 | 2 | -5/+58 | |
| | | | ||||||
* | | | Merge pull request #15722 from akshay-vishnoi/spell-correct | Zachary Scott | 2014-06-15 | 8 | -11/+11 | |
|\ \ \ | | | | | | | | | [ci skip] /mysql/i -> MySQL, Spell correct in continuation to #15555 | |||||
| * | | | /mysql/i -> MySQL, Spell correct in continuation to #15555 | Akshay Vishnoi | 2014-06-14 | 8 | -11/+11 | |
| | | | | ||||||
* | | | | Merge pull request #15723 from akshay-vishnoi/sql-correction | Zachary Scott | 2014-06-15 | 2 | -3/+3 | |
|\ \ \ \ | | | | | | | | | | | [ci skip] Use `an` for SQL | |||||
| * | | | | [ci skip] Use `an` for SQL | Akshay Vishnoi | 2014-06-14 | 2 | -3/+3 | |
| |/ / / | ||||||
* | | / | Change the deprecation warning on `serialized_attributes` | Sean Griffin | 2014-06-15 | 1 | -8/+2 | |
| |_|/ |/| | | | | | | | | to "without replacement" | |||||
* | | | Deprecate `serialized_attributes` without replacement | Sean Griffin | 2014-06-14 | 3 | -18/+26 | |
|/ / | | | | | | | | | We've stopped using it internally, in favor of polymorphism. So should you! | |||||
* | | Parsing DATABASE_URI, use URI#hostname: it's smarter about IPv6 | Matthew Draper | 2014-06-14 | 3 | -1/+20 | |
| | | | | | | | | Fixes #15705. | |||||
* | | Merge pull request #15702 from sgrif/sg-rm-serialized | Rafael Mendonça França | 2014-06-13 | 4 | -14/+2 | |
|\ \ | | | | | | | Remove `serialized?` from the type interface | |||||
| * | | Remove `serialized?` from the type interface | Sean Griffin | 2014-06-13 | 4 | -14/+2 | |
| | | | ||||||
* | | | Merge pull request #15701 from zzak/issue_15496 | Rafael Mendonça França | 2014-06-13 | 1 | -1/+5 | |
|\ \ \ | | | | | | | | | Open extension point for defining options in build_through_record | |||||
| * | | | Open extension point for defining options in build_through_record | Zachary Scott | 2014-06-13 | 1 | -1/+5 | |
| | | | | | | | | | | | | | | | | This fixes #15496 | |||||
* | | | | Merge pull request #15694 from sgrif/sg-method-missing | Rafael Mendonça França | 2014-06-13 | 1 | -34/+1 | |
|\ \ \ \ | | | | | | | | | | | Remove unused `method_missing` definition | |||||
| * | | | | Remove unused `method_missing` definition | Sean Griffin | 2014-06-13 | 1 | -34/+1 | |
| | | | | | | | | | | | | | | | | | | | | We always define attribute methods in the constructor or in `init_with`. | |||||
* | | | | | Merge pull request #15343 from dontfidget/fix_polymorphic_automatic_inverse_of | Rafael Mendonça França | 2014-06-13 | 5 | -1/+16 | |
|\ \ \ \ \ | |_|_|/ / |/| | | | | prevent bad automatic inverse_of association | |||||
| * | | | | use name specified by 'as' for automatic inverse association to avoid ↵ | Andrew S. Brown | 2014-06-10 | 5 | -1/+16 | |
| | | | | | | | | | | | | | | | | | | | | reflecting on wrong association | |||||
* | | | | | Through associations should set both parent ids on join models | Sean Griffin | 2014-06-13 | 5 | -7/+47 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | member = Member.new(club: Club.new) member.save! Before: member.current_membership.club_id # => nil After: member.current_membership.club_id # => club's id | |||||
* | | | | | Merge pull request #15674 from sgrif/sg-mutable-attributes | Matthew Draper | 2014-06-14 | 12 | -36/+149 | |
|\ \ \ \ \ | | | | | | | | | | | | | Detect in-place changes on mutable AR attributes | |||||
| * | | | | | Detect in-place changes on mutable AR attributes | Sean Griffin | 2014-06-13 | 12 | -36/+149 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have several mutable types on Active Record now. (Serialized, JSON, HStore). We need to be able to detect if these have been modified in place. | |||||
* | | | | | | Merge pull request #15695 from sgrif/sg-rm-column-types-override | Rafael Mendonça França | 2014-06-13 | 2 | -11/+2 | |
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | | Remove unused column types override | |||||
| * | | | | | Remove unused column types override | Sean Griffin | 2014-06-13 | 2 | -11/+2 | |
| | | | | | |