Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Merge pull request #13899 from ↵ | Rafael Mendonça França | 2014-02-04 | 2 | -1/+11 |
|\ | | | | | | | | | Fortisque/kevin/active_record_HABTM_with_belongs_to destruction errors out on HABTM w/out primary key | ||||
| * | fix HABTM w/out primary key errors on destruction | Kevin Casey | 2014-02-02 | 2 | -1/+11 |
| | | |||||
* | | some wording format changes. [ci skip] | Yves Senn | 2014-02-03 | 2 | -6/+6 |
| | | |||||
* | | pass `habtm :autosave` to underlying `hm:t` association. Closes #13923. | Yves Senn | 2014-02-03 | 4 | -8/+35 |
| | | |||||
* | | docs, revisit polymorphic associations with STI example. [ci skip] | Yves Senn | 2014-02-03 | 1 | -2/+5 |
| | | | | | | | | | | | | This is a follow up to #13926. /cc @fxn | ||||
* | | Fixes the camelCase variable name in the docs [ci skip] | Fred Wu | 2014-02-03 | 1 | -2/+2 |
| | | |||||
* | | Remove warnings for already defined methods | Rafael Mendonça França | 2014-02-01 | 1 | -1/+3 |
| | | |||||
* | | Make arel methods private API | Rafael Mendonça França | 2014-02-01 | 2 | -6/+5 |
| | | | | | | | | | | | | Since its conception arel was made to be private API of Active Record. If users want to use arel features directly we should provide a way using the Active Record API without exposing the arel implementation. | ||||
* | | Merge pull request #13688 from jbaudanza/psql-index-exists | Rafael Mendonça França | 2014-02-01 | 3 | -0/+35 |
|\ \ | | | | | | | | | | | | | | | | | | | PostgreSQL implementation of SchemaStatements#index_name_exists? Conflicts: activerecord/CHANGELOG.md | ||||
| * | | psql implementation of #index_name_exists? | Jonathan Baudanza | 2014-01-16 | 3 | -0/+35 |
| | | | |||||
* | | | Fixes issue with parsing whitespace content back from database - fixes #13907 | Mauricio Linhares | 2014-02-01 | 3 | -2/+26 |
| | | | |||||
* | | | this class depends on JoinHelper, so we should require it | Aaron Patterson | 2014-01-31 | 1 | -0/+2 |
| |/ |/| | |||||
* | | Minor changelog improvements [ci skip] | Carlos Antonio da Silva | 2014-01-31 | 1 | -4/+4 |
| | | |||||
* | | Merge pull request #13896 from laurocaetano/dangerous_association_names | Carlos Antonio da Silva | 2014-01-31 | 5 | -0/+52 |
|\ \ | | | | | | | Associations now raises `ArgumentError` on name conflicts. Closes #13217. | ||||
| * | | Associations now raise `ArgumentError` on name conflicts. | Lauro Caetano | 2014-01-31 | 5 | -0/+52 |
| | | | | | | | | | | | | | | | Dangerous association names conflicts include instance or class methods already defined by `ActiveRecord::Base`. | ||||
* | | | Remove unused variable. | Tim Fenney | 2014-01-31 | 1 | -1/+1 |
|/ / | |||||
* | | Merge pull request #13859 from huoxito/let-it-go | Rafael Mendonça França | 2014-01-30 | 2 | -2/+10 |
|\ \ | | | | | | | Let `unscope` ignore non Arel scope.where_values | ||||
| * | | Let `unscope` ignore non Arel scope.where_values | Washington Luiz | 2014-01-30 | 2 | -2/+10 |
| | | | |||||
* | | | Merge pull request #13886 from arthurnn/fix_relation_arel | Rafael Mendonça França | 2014-01-30 | 8 | -18/+52 |
|\ \ \ | |/ / |/| | | Fix regression on .select method | ||||
| * | | Fix regression on `.select_*` methods. | Arthur Neves | 2014-01-30 | 8 | -18/+52 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a common pattern: ``` query = author.posts.select(:title) connection.select_one(query) ``` However `.select` returns a ActiveRecord::AssociationRelation, which has the bind information, so we can use that to get the right sql query. Also fix select_rows on postgress and sqlite3 that were not using the binds [fixes #7538] [fixes #12017] [related #13731] [related #12056] | ||||
* | | | Remove automatic removal of Date/Time stubs after each test case | Rafael Mendonça França | 2014-01-30 | 1 | -1/+5 |
| | | | | | | | | | | | | | | | | | | This behavior is only work out-of-box with minitest and also add a downside to run after each test case, even if we don't used the travel or travel_to methods | ||||
* | | | Merge pull request #13878 from marcandre/leave_my_options_alone | Rafael Mendonça França | 2014-01-30 | 2 | -2/+8 |
|\ \ \ | | | | | | | | | find_in_batches should not mutate its argument | ||||
| * | | | find_in_batches should not mutate its argument | Marc-Andre Lafortune | 2014-01-29 | 2 | -2/+8 |
| | | | | |||||
* | | | | docs, `references` is only used with `includes`. Closes #13727. | Yves Senn | 2014-01-30 | 1 | -9/+14 |
| |/ / |/| | | | | | | | | | | | | | | | | | There is no gain in `referencing` tables that are not used for preloading. Furthermore it will break if polymorphic associations are invloved. This is because `references_eager_loaded_tables?` uses all `reference_values` to decide wether to `eager_load` or `preload`. | ||||
* | | | Aesthetic | Rafael Mendonça França | 2014-01-29 | 3 | -13/+13 |
| | | | |||||
* | | | Fixing issue with activerecord serialization not being able to dump a record ↵ | Mauricio Linhares | 2014-01-29 | 5 | -1/+52 |
|/ / | | | | | | | after loading it from YAML - fixes #13861 | ||||
* | | Merge pull request #13201 from marcandre/find_in_batch_enumerator | Rafael Mendonça França | 2014-01-29 | 3 | -0/+27 |
|\ \ | | | | | | | | | | | | | | | | | | | | | | `find_in_batches` now returns an `Enumerator` Conflicts: activerecord/CHANGELOG.md activerecord/lib/active_record/relation/batches.rb | ||||
| * | | `find_in_batches` now returns an `Enumerator` when called without a block, ↵ | Marc-Andre Lafortune | 2013-12-06 | 3 | -0/+27 |
| | | | | | | | | | | | | | | | | | | so that it can be chained with other `Enumerable` methods. | ||||
* | | | Mention find_each in find_in_batches doc [ci skip] | Marc-Andre Lafortune | 2014-01-29 | 1 | -0/+2 |
| | | | |||||
* | | | `enum` now raises on "dangerous" name conflicts | Godfrey Chan | 2014-01-29 | 3 | -3/+113 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Dangerous name conflicts includes instance or class method conflicts with methods defined within `ActiveRecord::Base` but not its ancestors, as well as conflicts with methods generated by other enums on the same class. Fixes #13389. | ||||
* | | | `scope` now raises on "dangerous" name conflicts | Godfrey Chan | 2014-01-29 | 4 | -4/+95 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Similar to dangerous attribute methods, a scope name conflict is dangerous if it conflicts with an existing class method defined within `ActiveRecord::Base` but not its ancestors. See also #13389. *Godfrey Chan*, *Philippe Creux* | ||||
* | | | Fixed a bug in AR::Base#respond_to? | Godfrey Chan | 2014-01-29 | 2 | -2/+11 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: >> ActiveRecord::Base.respond_to?(:find_by_something) NoMethodError: undefined method `abstract_class?' for Object:Class After: >> ActiveRecord::Base.respond_to?(:find_by_something) => false | ||||
* | | | Correctly send the string given to lock! and reload(:lock) to the lock scope ↵ | Mauricio Linhares | 2014-01-29 | 3 | -1/+22 |
| | | | | | | | | | | | | | | | | | | - fixes #13788 As per the documentation at lock!, if the :lock option is a string it should use the given SQL to generate the lock statement. | ||||
* | | | Handle aliased attributes in AR::Relation#select, #order, etc. | Tsutomu Kuroda | 2014-01-29 | 4 | -1/+44 |
| | | | | | | | | | | | | | | | | | | | | | With this we can write `Model#select(:aliased)`, `Model#order(:aliased)`, `Model#reoder(aliased: :desc)`, etc. Supplementary work to 54122067acaad39b277a5363c6d11d6804c7bf6b. | ||||
* | | | Fix indent on test case [ci skip] | Carlos Antonio da Silva | 2014-01-28 | 1 | -2/+2 |
| | | | |||||
* | | | Merge pull request #13838 from vipulnsward/13197-fix-has-one-documentation | Damien Mathieu | 2014-01-28 | 1 | -1/+2 |
|\ \ \ | | | | | | | | | Add docs about behaviour of replacing a has_one associate object. | ||||
| * | | | Add docs about behaviour of replacing a has_one associate object, that the ↵ | Vipul A M | 2014-01-28 | 1 | -1/+2 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | previous one is deleted even if the new one doesn't get persisted to database. Fixes #13197 . [ci skip] | ||||
* | | | | use the new clear_validators! api everywhere to reset validators in tests | Kuldeep Aggarwal | 2014-01-28 | 2 | -3/+3 |
| | | | | |||||
* | | | | Display value when raising due to unscope() issues | Washington Luiz | 2014-01-27 | 1 | -1/+1 |
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hopefully make it easier to debug errors. e.g Before: RuntimeError: unscope(where: "deleted_at") failed: unscoping String is unimplemented. After: RuntimeError: unscope(where: "deleted_at") failed: unscoping String "'t'='t'" is unimplemented. | ||||
* | | | Merge pull request #13785 from kuldeepaggarwal/fix-find_with_multiple_ids | Yves Senn | 2014-01-24 | 2 | -9/+26 |
|\ \ \ | | | | | | | | | Fix `ActiveRecord::RecordNotFound` error message with custom primary key | ||||
| * | | | Fix `ActiveRecord::RecordNotFound` error message with custom primary key | Kuldeep Aggarwal | 2014-01-25 | 2 | -9/+26 |
| | | | | |||||
* | | | | Remove unused assignment to fix warnings in enum test. | Vipul A M | 2014-01-24 | 1 | -1/+0 |
| | | | | |||||
* | | | | Merge pull request #13799 from kbrock/better_dirty | Jeremy Kemper | 2014-01-22 | 7 | -18/+49 |
|\ \ \ \ | |/ / / |/| | | | Better ActiveRecord hierarchy for Dirty and others | ||||
| * | | | Move changed_attributes into dirty.rb | Keenan Brock | 2014-01-22 | 6 | -16/+47 |
| | | | | | | | | | | | | Move serialization dirty into serialization.rb | ||||
| * | | | put core at the beginning so other classes can modify the behavior | Keenan Brock | 2014-01-22 | 2 | -2/+2 |
| | | | | |||||
* | | | | Merge pull request #13791 from kei-s/remove_duplicate_merge | Carlos Antonio da Silva | 2014-01-22 | 1 | -1/+0 |
|\ \ \ \ | | | | | | | | | | | Remove duplicate merge | ||||
| * | | | | Remove duplicate merge | kei | 2014-01-22 | 1 | -1/+0 |
| | | | | | |||||
* | | | | | Improve the CHANGELOG entry [ci skip] | Rafael Mendonça França | 2014-01-22 | 1 | -2/+14 |
| | | | | | |||||
* | | | | | Make CollectionProxy#reset return self | Rafael Mendonça França | 2014-01-22 | 1 | -1/+2 |
| | | | | | |||||
* | | | | | Calling reset on a collection association should unload the assocation | Kelsey Schlarman | 2014-01-21 | 3 | -0/+36 |
|/ / / / | | | | | | | | | | | | | Need to define #reset on CollectionProxy. |