Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Remove a long gone :order option from has_one's valid_options. | thedarkone | 2014-06-09 | 1 | -1/+1 |
| | |||||
* | Merge pull request #15210 from arthurnn/fix_hbtm_reflection | Arthur Neves | 2014-05-24 | 1 | -2/+2 |
| | | | | | | | | | Fix habtm reflection Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/counter_cache.rb activerecord/lib/active_record/reflection.rb activerecord/test/cases/reflection_test.rb | ||||
* | Prevented belongs_to: touch propagating up if there are no changes being saved | Brock Trappitt | 2014-05-21 | 1 | -1/+1 |
| | |||||
* | Fixed the inferred table name for HABTM within a schema | Eric Chahin | 2014-05-20 | 1 | -1/+1 |
| | | | | Fixes #14824. | ||||
* | Remove the assignment for real this time. | Zachary Scott | 2014-05-16 | 1 | -2/+2 |
| | | | | | | cc: https://github.com/rails/rails/commit/a11e2fcff8cdc9691b977d8330abe63024f8c732#commitcomment-6353614 and 0369dbf | ||||
* | prepend mutates the string so we can remove the assignment | Rafael Mendonça França | 2014-05-16 | 1 | -1/+1 |
| | |||||
* | Don't use Active Support where it is not needed. | Rafael Mendonça França | 2014-05-14 | 1 | -1/+3 |
| | | | | | parent_name is a string of nil, never a blank string so we don't need to use presence. | ||||
* | Fix how to compute class name on habtm namespaced. | Kassio Borges | 2014-05-13 | 1 | -1/+5 |
| | | | | | | Thank's for @laurocaetano for the help with tests. :smiley: Fixes #14709 | ||||
* | Fix custom join_table name on habtm reflections | Kassio Borges | 2014-04-25 | 1 | -1/+1 |
| | | | | | | When used a custom join_table name on a habtm, rails was not saving it on Reflections. This causes a problem when rails loads fixtures, because it uses the reflections to set database with fixtures. | ||||
* | Hide BelongsToAssociation#increment_counters and #decrement_counters | Jean Boussier | 2014-04-15 | 1 | -1/+0 |
| | |||||
* | Use inheritance chain instead of callbacks to increment counter caches after ↵ | Jean Boussier | 2014-04-14 | 1 | -16/+0 |
| | | | | destroy | ||||
* | Use inheritance chain instead of callbacks to increment counter caches after ↵ | Jean Boussier | 2014-04-14 | 1 | -12/+1 |
| | | | | create | ||||
* | Make counter cache decrementation on destroy idempotent | Jean Boussier | 2014-04-13 | 1 | -4/+5 |
| | |||||
* | Associations now raise `ArgumentError` on name conflicts. | Lauro Caetano | 2014-01-31 | 1 | -0/+6 |
| | | | | | Dangerous association names conflicts include instance or class methods already defined by `ActiveRecord::Base`. | ||||
* | On destroying do not touch destroyed belongs to association. | Paul Nikitochkin | 2013-12-23 | 1 | -1/+1 |
| | | | | Fixes: #13445 | ||||
* | make sure cached table name is a string. fixes #12582 | Aaron Patterson | 2013-12-12 | 1 | -1/+1 |
| | |||||
* | Move the parameter normalization to the initialize method | Rafael Mendonça França | 2013-12-11 | 1 | -4/+5 |
| | | | | | activerecord-deprecated_finders expects the parameters denormalized in its initialize method | ||||
* | Revert the whole refactoring in the association builder classes. | Rafael Mendonça França | 2013-12-11 | 7 | -46/+62 |
| | | | | This is to get activerecord-deprecated_finders work again | ||||
* | Bring back the valid_options class accessor | Rafael Mendonça França | 2013-12-11 | 6 | -9/+14 |
| | | | | It is need in activerecord-deprecated_finders | ||||
* | polymorphic belongs_to association with touch: true updates old record correctly | Severin Schoepke | 2013-12-05 | 1 | -1/+7 |
| | | | | | | | | | Example: Given you have a comments model with a polymorphic commentable association (e.g. books and songs) with the touch option set. Every time you update a comment its commentable should be touched. This was working when you changed attributes on the comment or when you moved the comment from one book to another. However, it was not working when moving a comment from a book to a song. This is now fixed. | ||||
* | Raise `ArgumentError` when `has_one` is used with `counter_cache` | Godfrey Chan | 2013-11-29 | 2 | -2/+2 |
| | | | | | | | | | Previously, the `has_one` macro incorrectly accepts the `counter_cache` option due to a bug, although that options was never supported nor functional on `has_one` and `has_one ... through` relationships. It now correctly raises an `ArgumentError` when passed that option. For reference, this bug was introduced in 52f8e4b9. | ||||
* | Merge pull request #12390 from kennyj/rename_to_association_methods | Rafael Mendonça França | 2013-11-05 | 2 | -2/+2 |
|\ | | | | | | | | | | | | | | | | | Renamed generated_feature_methods to generated_association_methods. Conflicts: activerecord/lib/active_record/associations/builder/association.rb activerecord/lib/active_record/associations/builder/singular_association.rb activerecord/test/cases/base_test.rb | ||||
| * | Renamed generated_feature_methods to generated_association_methods. | kennyj | 2013-09-28 | 2 | -2/+2 |
| | | |||||
* | | Method visibility will not make difference here | Rafael Mendonça França | 2013-10-09 | 4 | -8/+0 |
| | | |||||
* | | Remove builder instances | Rafael Mendonça França | 2013-10-09 | 2 | -22/+10 |
| | | | | | | | | | | All the job can be done at class level so we can avoid some object allocation | ||||
* | | Extract the scope building to a class method | Rafael Mendonça França | 2013-10-09 | 2 | -10/+17 |
| | | |||||
* | | Remove unneeded reader | Rafael Mendonça França | 2013-10-09 | 1 | -2/+0 |
| | | |||||
* | | Move wrap_scope to class level | Rafael Mendonça França | 2013-10-09 | 1 | -2/+2 |
| | | |||||
* | | Move macro to class level | Rafael Mendonça França | 2013-10-09 | 4 | -5/+5 |
| | | |||||
* | | Make validate_options a class method | Rafael Mendonça França | 2013-10-09 | 1 | -3/+3 |
| | | |||||
* | | Make valid_options a class method | Rafael Mendonça França | 2013-10-09 | 6 | -7/+7 |
| | | |||||
* | | Define the association extensions without need to have a builder | Rafael Mendonça França | 2013-10-09 | 2 | -14/+14 |
| | | | | | | | | instance | ||||
* | | :scissors: | Rafael Mendonça França | 2013-10-09 | 2 | -2/+2 |
| | | |||||
* | | Push define_accessors to class level since we don't need anythig from | Rafael Mendonça França | 2013-10-08 | 3 | -8/+8 |
| | | | | | | | | the instance | ||||
* | | Use the reflection name instead of the accessor | Rafael Mendonça França | 2013-10-08 | 2 | -1/+2 |
| | | |||||
* | | Move add_counter_cache_methods to class level | Rafael Mendonça França | 2013-10-08 | 1 | -2/+2 |
| | | |||||
* | | Move define_constructors to class level | Rafael Mendonça França | 2013-10-08 | 1 | -3/+2 |
| | | |||||
* | | Move define_writers to class level since we don't need anything from the | Rafael Mendonça França | 2013-10-08 | 2 | -3/+3 |
| | | | | | | | | instance | ||||
* | | Move define_readers to class method since it doesn't need nothing from | Rafael Mendonça França | 2013-10-08 | 2 | -5/+3 |
| | | | | | | | | the instance | ||||
* | | fix the variable name | Aaron Patterson | 2013-10-02 | 1 | -7/+7 |
| | | |||||
* | | remove some duplicate code | Aaron Patterson | 2013-10-02 | 1 | -8/+1 |
| | | |||||
* | | remove HABTM associations | Aaron Patterson | 2013-10-02 | 1 | -1/+0 |
| | | |||||
* | | repurpose the HABTM builder class | Aaron Patterson | 2013-10-02 | 1 | -24/+1 |
| | | |||||
* | | keep track of the left and right reflections and expose those | Aaron Patterson | 2013-10-02 | 1 | -5/+5 |
| | | |||||
* | | have the builder create the middle reflection | Aaron Patterson | 2013-10-02 | 1 | -2/+13 |
| | | |||||
* | | Merge branch 'master' into habtm | Aaron Patterson | 2013-10-02 | 7 | -51/+43 |
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: we can define callbacks without a builder instance push methods that don't depend on the instance to the class get the name from the reflection cache the name and options on the stack decouple belongs_to callback definition from the builder instance. add_before_destroy_callbacks doesn't depend on the instance, so push it to the class. valid_options doesn't depend on the instance, so push it to the class use the information on the reflection to determine whether callbacks should be added Running all isolated test for actionview association builder is no longer needed for counter cache, so remove it push constructable? on to the reflection Adds the Rails maintenance policy to the Guides name is on the reflection, so just use the reflection decouple define_callback from the instance Added activemodel as a explicit dependency unify `Fixes` notes in AR changelog. [ci skip]. improving `reload` doc wording. #12418 [ci skip] Update AR reload doc for the case of manually set primary key attribute [ci skip] | ||||
| * | | we can define callbacks without a builder instance | Aaron Patterson | 2013-10-02 | 4 | -9/+9 |
| | | | |||||
| * | | push methods that don't depend on the instance to the class | Aaron Patterson | 2013-10-02 | 2 | -6/+6 |
| | | | |||||
| * | | get the name from the reflection | Aaron Patterson | 2013-10-02 | 1 | -1/+1 |
| | | | |||||
| * | | cache the name and options on the stack | Aaron Patterson | 2013-10-02 | 1 | -1/+3 |
| | | |