Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | remove deprecated scope stuff | Jon Leighton | 2012-04-26 | 3 | -22/+2 | |
| | | ||||||
* | | remove unused method | Jon Leighton | 2012-04-25 | 1 | -6/+0 | |
| | | ||||||
* | | remove tests for #with_scope (it's now deprecated) | Jon Leighton | 2012-04-25 | 1 | -6/+0 | |
| | | ||||||
* | | extract deprecated code | Jon Leighton | 2012-04-25 | 1 | -2/+2 | |
| | | ||||||
* | | Adds test to check that circular preloading does not modify Model.unscoped ↵ | Benedikt Deicke | 2012-04-03 | 1 | -0/+2 | |
| | | | | | | | | (as described in #5667) | |||||
* | | Merge pull request #5334 from courtland/master | Jon Leighton | 2012-03-30 | 1 | -0/+6 | |
|\ \ | | | | | | | Fix deleting from a HABTM join table upon destroying an object of a model with optimistic locking enabled. | |||||
| * | | Tests for removing a HABTM association when optimistic locking is enabled. | Nick Rogers | 2012-03-07 | 1 | -0/+6 | |
| | | | ||||||
* | | | Deprecate eager-evaluated scopes. | Jon Leighton | 2012-03-21 | 16 | -61/+62 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't use this: scope :red, where(color: 'red') default_scope where(color: 'red') Use this: scope :red, -> { where(color: 'red') } default_scope { where(color: 'red') } The former has numerous issues. It is a common newbie gotcha to do the following: scope :recent, where(published_at: Time.now - 2.weeks) Or a more subtle variant: scope :recent, -> { where(published_at: Time.now - 2.weeks) } scope :recent_red, recent.where(color: 'red') Eager scopes are also very complex to implement within Active Record, and there are still bugs. For example, the following does not do what you expect: scope :remove_conditions, except(:where) where(...).remove_conditions # => still has conditions | |||||
* | | | Not need to pass join attributes to association build | Rafael Mendonça França | 2012-03-07 | 2 | -9/+9 | |
| | | | ||||||
* | | | Add test case to has_many through association when mass_assignment_sanitizer is | Rafael Mendonça França | 2012-03-05 | 3 | -0/+13 | |
|/ / | | | | | | | :strict | |||||
* | | added test for #3732 | Rick Martinez | 2012-02-10 | 3 | -1/+12 | |
| | | ||||||
* | | Allow store to be a not null column. | Jeremy Walker | 2012-02-02 | 1 | -0/+1 | |
| | | ||||||
* | | test_get_ids_for_ordered_association fixed | gregolsen | 2012-01-31 | 1 | -1/+1 | |
| | | ||||||
* | | ids_reader method fixed, test added to has_many association | gregolsen | 2012-01-31 | 1 | -0/+1 | |
| | | ||||||
* | | Fix bug where reset_counters resets the wrong counter cache. | David Peter | 2012-01-16 | 2 | -0/+8 | |
| | | | | | | | | | | | | | | | | If a model belongs_to two associations with the same class, then reset_counters will reset the wrong counter cache. Finding the right reflection should use the foreign_key instead, which should be unique. | |||||
* | | Deprecate inferred JOINs with includes + SQL snippets. | Jon Leighton | 2012-01-16 | 3 | -3/+6 | |
| | | | | | | | | | | | | See the CHANGELOG for details. Fixes #950. | |||||
* | | Revert "Deprecate implicit eager loading. Closes #950." | Jon Leighton | 2012-01-16 | 3 | -5/+5 | |
| | | | | | | | | This reverts commit c99d507fccca2e9e4d12e49b4387e007c5481ae9. | |||||
* | | Fixed after_initialize callbacks call on AR model #dup | Bogdan Gusiev | 2012-01-07 | 1 | -0/+5 | |
| | | ||||||
* | | Merge branch 'master' of git://github.com/rails/rails | Dmitry Polushkin | 2011-12-31 | 28 | -33/+93 | |
|\ \ | ||||||
| * | | Test fixtures with custom model and table names | Alexey Muranov | 2011-12-30 | 2 | -0/+6 | |
| | | | | | | | | | | | | | | | | | | Test using fixtures with random names and model names, that is not following naming conventions but using set_fixture_class instead. It is expected that the table name be defined in the model, but this is not explicitly tested here. This will need to be fixed. | |||||
| * | | Deprecate implicit eager loading. Closes #950. | Jon Leighton | 2011-12-29 | 3 | -5/+5 | |
| | | | ||||||
| * | | Support establishing connection on ActiveRecord::Model. | Jon Leighton | 2011-12-28 | 1 | -0/+3 | |
| | | | | | | | | | | | | | | | This is the 'top level' connection, inherited by any models that include ActiveRecord::Model or inherit from ActiveRecord::Base. | |||||
| * | | Support nested AR::Models | Jon Leighton | 2011-12-24 | 1 | -0/+8 | |
| | | | ||||||
| * | | Add test for inheritance from a non-AR superclass | Jon Leighton | 2011-12-24 | 1 | -0/+11 | |
| | | | ||||||
| * | | I herd you like modules. | Jon Leighton | 2011-12-24 | 1 | -0/+13 | |
| | | | ||||||
| * | | serialize fails on subclass | Alvaro Bautista | 2011-12-23 | 1 | -0/+4 | |
| | | | ||||||
| * | | added failing tests for has_many, has_one and belongs_to associations with ↵ | Jakub Kuźma | 2011-12-21 | 1 | -2/+2 | |
| | | | | | | | | | | | | strict mass assignment sanitizer, fixed build_record to not merge creation_attributes, removed failing nested attributes tests (that feature was broken anyway) #4051 | |||||
| * | | call scope within unscoped to prevent duplication of where values | Sergey Nartimov | 2011-12-17 | 1 | -0/+2 | |
| | | | ||||||
| * | | Allow nested attributes in associations to update values in it's owner ↵ | Andrew Kaspick | 2011-12-14 | 1 | -1/+4 | |
| | | | | | | | | | | | | object. Fixes a regression from 3.0.x | |||||
| * | | Fix #3890. (Calling proxy_association in scope chain.) | Jon Leighton | 2011-12-08 | 1 | -1/+5 | |
| | | | ||||||
| * | | Deprecate set_locking_column in favour of self.locking_column= | Jon Leighton | 2011-11-29 | 1 | -1/+1 | |
| | | | ||||||
| * | | Deprecate set_primary_key in favour of self.primary_key= | Jon Leighton | 2011-11-29 | 12 | -14/+14 | |
| | | | ||||||
| * | | Deprecate set_sequence_name in favour of self.sequence_name= | Jon Leighton | 2011-11-29 | 1 | -1/+1 | |
| | | | ||||||
| * | | Deprecate set_inheritance_column in favour of self.inheritance_column= | Jon Leighton | 2011-11-29 | 1 | -1/+2 | |
| | | | ||||||
| * | | Deprecate set_table_name in favour of self.table_name= or defining your own ↵ | Jon Leighton | 2011-11-29 | 3 | -5/+5 | |
| | | | | | | | | | | | | method. | |||||
| * | | don't change class definition in test case | Josh Susser | 2011-11-29 | 1 | -0/+4 | |
| | | | ||||||
| * | | use GeneratedFeatureMethods module for associations | Josh Susser | 2011-11-27 | 1 | -1/+0 | |
| | | | ||||||
| * | | Allow the :class_name option for associations to take a symbol. | Jon Leighton | 2011-11-04 | 1 | -0/+1 | |
| | | | | | | | | | | | | | | | This is to avoid confusing newbies, and to be consistent with the fact that other options like :foreign_key already allow a symbol or a string. | |||||
| * | | Tests gotta run in 1.8 too | Jeremy Kemper | 2011-10-13 | 1 | -2/+2 | |
| | | | ||||||
| * | | Added ActiveRecord::Base.store for declaring simple single-column key/value ↵ | David Heinemeier Hansson | 2011-10-13 | 1 | -0/+1 | |
| | | | | | | | | | | | | stores [DHH] | |||||
* | | | Merge branch 'master' of git://github.com/rails/rails | Dmitry Polushkin | 2011-09-15 | 2 | -10/+12 | |
|\| | | ||||||
| * | | Raise error when using write_attribute with a non-existent attribute. | Jon Leighton | 2011-09-13 | 1 | -6/+7 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we would just silently write the attribute. This can lead to subtle bugs (for example, see the change in AutosaveAssociation where a through association would wrongly gain an attribute. Also, ensuring that we never gain any new attributes after initialization will allow me to reduce our dependence on method_missing. | |||||
| * | | Make protected method public so we avoid method_missing. | Jon Leighton | 2011-09-13 | 1 | -4/+5 | |
| | | | ||||||
* | | | Test polymorphic record with optimistic locking and counter cache should be ↵ | Dmitry Polushkin | 2011-09-09 | 1 | -1/+1 | |
|/ / | | | | | | | destoyed without catching the ActiveRecord::StaleObjectError. | |||||
* | | Ensure we are not comparing a string with a symbol in ↵ | Jon Leighton | 2011-09-06 | 1 | -1/+1 | |
| | | | | | | | | HasManyAssociation#inverse_updates_counter_cache?. Fixes #2755, where a counter cache could be decremented twice as far as it was supposed to be. | |||||
* | | We need to recorder here. Need to drop the order from default scope. | Arun Agrawal | 2011-09-05 | 1 | -0/+10 | |
| | | | | | | Fixes #2832 | |||||
* | | The join_nodes must be passed to the JoinDependency initializer and ↵ | Jon Leighton | 2011-08-29 | 1 | -0/+2 | |
| | | | | | | | | therefore counted by the alias tracker. This is because the association_joins are aliased on initialization and then the tables are cached, so it is no use to alias the join_nodes later. Fixes #2556. | |||||
* | | Fix default scope thread safety. Thanks @thedarkone for reporting. | Jon Leighton | 2011-08-13 | 1 | -0/+9 | |
| | | ||||||
* | | use existing model for testing Base.create with #after_initialize | Gabriel Horner | 2011-07-24 | 2 | -9/+5 | |
| | | ||||||
* | | simplify and be more explicit about create and after_initialize tests | Gabriel Horner | 2011-07-24 | 1 | -6/+2 | |
| | |