aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused `Column#with_type`Sean Griffin2015-02-021-6/+0
| | | | | Now that type casting has nothing to do with columns, our only usage of this method is gone.
* Merge pull request #18779 from jduff/fix_documentation_typoAbdelkader Boudih2015-02-021-1/+1
|\ | | | | Fix typo in Time#change docs
| * Fix typo in Time#change docsJohn Duff2015-02-021-1/+1
|/
* Merge pull request #18612 from ↵Aaron Patterson2015-02-019-5/+80
|\ | | | | | | | | eileencodes/fix-validates-on-associated-record-if-parent-is-validate-false Fix validations on child record when record parent has validate: false
| * Fix validations on child record when record parent has validate: falseeileencodes2015-02-019-5/+80
|/ | | | | | | | | | | | | | Fixes #17621. This 5 year old (or older) issue causes validations to fire when a parent record has `validate: false` option and a child record is saved. It's not the responsibility of the model to validate an associated object unless the object was created or modified by the parent. Clean up tests related to validations `assert_nothing_raised` is not benefiting us in these tests Corrected spelling of "respects" It's better to use `assert_not_operator` over `assert !r.valid`
* Cache `url_helpers` separately for mailersAndrew White2015-02-011-44/+50
| | | | | The commit 3b63780 re-introduced url helper caching but we need to cache a separate module for Action Mailer without paths.
* Merge pull request #18776 from eileencodes/cache-url-helpersAndrew White2015-02-011-42/+44
|\ | | | | Cache `url_helpers`
| * Cache `url_helpers`eileencodes2015-02-011-42/+44
| | | | | | | | | | | | `url_helpers` used to be memoized. This was lost in a refactoring and this PR adds it back. We noticed this while investigating why integration tests are slower than controller tests.
* | add destroyed records to the currend transactionAaron Patterson2015-02-012-1/+5
| |
* | Fix Issue #15549, unbounded memory growth when saving records that have any ↵Will Bryant2015-02-011-2/+3
| | | | | | | | after_create callbacks (or any associations, which makes after_create callbacks for you)
* | make the private methods privateAaron Patterson2015-02-011-2/+2
| |
* | push add to transaction logic down to the instanceAaron Patterson2015-02-013-6/+10
| | | | | | | | | | the transaction object shouldn't know so much about active record objects, so let's push the conditionals in to the instance.
* | remove conditional that is always trueAaron Patterson2015-02-011-3/+2
| |
* | stop making calls to add_recordAaron Patterson2015-02-011-1/+1
| |
* | Merge pull request #18770 from palkan/docs-hasone-dependentAbdelkader Boudih2015-02-011-0/+4
|\ \ | | | | | | Add note about has_one :through and :dependent
| * | [ci skip] add note about has_one :through and :dependentpalkan2015-02-011-0/+4
| | |
* | | Merge pull request #18756 from ajgrover/activejob_testsMatthew Draper2015-02-011-1/+1
|\ \ \ | |_|/ |/| | Update queue_classic gem to use latest
| * | Update queue_classic gem to use latestAlex Grover2015-01-311-1/+1
| | | | | | | | | | | | | | | | | | Remove '<3.0.0' requirement for queue_classic gem. This fixes the issue that the gem was attempting to parse the queue name as a URI, causing all of the tests to fail.
* | | Merge pull request #18721 from sj26/pre-discard-flashAaron Patterson2015-02-014-28/+51
|\ \ \ | | | | | | | | Pre-discard flash messages
| * | | Migrate old flash behaviourSamuel Cochran2015-01-302-6/+13
| | | |
| * | | Discard from flash before persisting in sessionSamuel Cochran2015-01-292-24/+26
| | | |
| * | | Fix flash remaining after last flash deletedSamuel Cochran2015-01-292-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Inside a controller functional test after the last flash is deleted it still persists the flash because to_session_value is nil. We should delete it from the session when the serialized version is nil, same as the flash middleware.
* | | | Merge pull request #18769 from gsamokovarov/exception-wrapper-windows-pathsAndrew White2015-02-012-2/+25
|\ \ \ \ | | | | | | | | | | Show proper traces on Windows for the error pages
| * | | | Show proper traces on Windows for the error pagesGenadi Samokovarov2015-02-012-2/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an issue brought up by @daniel-rikowski in rails/web-console#91. Citing his PR proposal here: > Prior to this, backtrace lines were simply split by a single colon. > > Unfortunately that is also the drive letter delimiter in Windows paths > which resulted in a lot of empty source fragments of "C:0". ("C" from > the drive letter and 0 from "/path/to/rails/file.rb:16".to_i) > > Now the trace line is split by the first colon followed by some digits, > which works for both Windows and Unix path styles. Now, the PR was sent against web-console, because of the templates copy issue we used to had. Instead of bothering the contributor to reopen the issue against upstream Rails itself, I will make sure he gets the credit by putting his name in [rails-contributors/hard_coded_authors.rb][]. [rails-contributors/hard_coded_authors.rb]: (https://github.com/fxn/rails-contributors/blob/master/app/models/names_manager/hard_coded_authors.rb).
* | | | | Merge branch 'master' into mdluo-masterAaron Patterson2015-02-0129-45/+45
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * master: Move required error message and changelog to Active Record Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846 Use Module#include instead of send :include, since now is a public method [ci skip] :scissors: warning from controller renderer test Conflicts: activerecord/CHANGELOG.md
| * | | | | Move required error message and changelog to Active RecordCarlos Antonio da Silva2015-02-014-7/+7
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | The new association error belongs to Active Record, not Active Model. See #18700 for reference.
| * | | | Merge pull request #18759 from yuki24/remove-warningYves Senn2015-02-011-3/+3
| |\ \ \ \ | | |/ / / | |/| | | :scissors: warning from controller renderer test
| | * | | :scissors: warning from controller renderer testYuki Nishijima2015-01-311-3/+3
| | | | | | | | | | | | | | | | | | | | rails/actionpack/test/controller/renderer_test.rb:89: warning: possible reference to past scope - defaults
| * | | | Merge pull request #18767 from robertomiranda/ruby-2.2Sean Griffin2015-01-3122-32/+32
| |\ \ \ \ | | | | | | | | | | | | Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846
| | * | | | Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846robertomiranda2015-01-3122-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | ref: https://github.com/rails/rails/pull/18763#issuecomment-72349769
| * | | | | Merge pull request #18763 from robertomiranda/ruby-2.2Sean Griffin2015-01-312-3/+3
| |\| | | | | | | | | | | | | | | | Use Module#include instead of send :include, since Module#include is a public method [ci skip]
| | * | | | Use Module#include instead of send :include, since now is a public method ↵robertomiranda2015-01-312-3/+3
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip] ref https://bugs.ruby-lang.org/issues/8846
* | | | | Merge pull request #1 from mdluo/pr/18316Mingdong Luo2015-01-313-1/+18
|\ \ \ \ \ | |/ / / / |/| | | | Fix n+1 query problem when eager loading nil associations (fixes #18312)
| * | | | Merge branch 'master' into pr/18316Mingdong Luo2015-01-31571-4788/+7210
| |\ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG.md
* | | | | Attribute assignment and type casting has nothing to do with columnsSean Griffin2015-01-3115-113/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's finally finished!!!!!!! The reason the Attributes API was kept private in 4.2 was due to some publicly visible implementation details. It was previously implemented by overloading `columns` and `columns_hash`, to make them return column objects which were modified with the attribute information. This meant that those methods LIED! We didn't change the database schema. We changed the attribute information on the class. That is wrong! It should be the other way around, where schema loading just calls the attributes API for you. And now it does! Yes, this means that there is nothing that happens in automatic schema loading that you couldn't manually do yourself. (There's still some funky cases where we hit the connection adapter that I need to handle, before we can turn off automatic schema detection entirely.) There were a few weird test failures caused by this that had to be fixed. The main source came from the fact that the attribute methods are now defined in terms of `attribute_names`, which has a clause like `return [] unless table_exists?`. I don't *think* this is an issue, since the only place this caused failures were in a fake adapter which didn't override `table_exists?`. Additionally, there were a few cases where tests were failing because a migration was run, but the model was not reloaded. I'm not sure why these started failing from this change, I might need to clear an additional cache in `reload_schema_from_cache`. Again, since this is not normal usage, and it's expected that `reset_column_information` will be called after the table is modified, I don't think it's a problem. Still, test failures that were unrelated to the change are worrying, and I need to dig into them further. Finally, I spent a lot of time debugging issues with the mutex used in `define_attribute_methods`. I think we can just remove that method entirely, and define the attribute methods *manually* in the call to `define_attribute`, which would simplify the code *tremendously*. Ok. now to make this damn thing public, and work on moving it up to Active Model.
* | | | | Merge pull request #18760 from hjoo/fix_fixturesAaron Patterson2015-01-311-1/+2
|\ \ \ \ \ | | | | | | | | | | | | changed deleted_tables list to set
| * | | | | changed deleted_tables list to setHyonjee Joo2015-01-311-1/+2
|/ / / / /
* | | | | Merge pull request #18512 from vipulnsward/18492-fixtures-with-stiAaron Patterson2015-01-317-12/+46
|\ \ \ \ \ | |_|/ / / |/| | | | Fix STI for fixtures from multi-files
| * | | | Fixes #18492Vipul A M2015-01-147-12/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add check for not deleting previously created fixtures, to overcome sti fixtures from multiple files - Added fixtures and fixtures test to verify the same - Fixed wrong fixtures duplicating data insertion in same table
* | | | | Remove `AttributeSet#initialized_keys`Sean Griffin2015-01-312-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method doesn't need to be lazy, as it is never called from reads. The only time it is called are in write cases, where we're about to loop through the results of it, and build the attribute objects anyway. So we don't gain anything by dodging the instantiation here. This is the only method that coupled `AttributeSet` to `LazyAttributeHash`, so removing it puts us back in a place where we can use a normal hash instead.
* | | | | Merge pull request #18700 from nygrenh/better-required-messageAaron Patterson2015-01-314-3/+29
|\ \ \ \ \ | |_|_|_|/ |/| | | | Provide a better error message on :required association
| * | | | Provide a better error message on :required associationHenrik Nygren2015-01-284-3/+29
| | | | | | | | | | | | | | | | | | | | Fixes #18696.
* | | | | Merge pull request #18753 from andreynering/guide-single-table-inheritanceRobin Dupret2015-01-312-0/+68
|\ \ \ \ \ | | | | | | | | | | | | Add Single Table Inheritance to guides [ci skip]
| * | | | | Add Single Table Inheritance to guides [ci skip]Andrey Nering2015-01-312-0/+68
| | | | | |
* | | | | | Merge pull request #18540 from andreynering/guides-custom-form-builderRobin Dupret2015-01-311-1/+8
|\ \ \ \ \ \ | | | | | | | | | | | | | | Improving 'Customizing Form Builder' section with example [ci skip]
| * | | | | | Improving 'Customizing Form Builder' section with example [ci skip]Andrey Nering2015-01-161-1/+8
| | | | | | |
* | | | | | | Merge pull request #18752 from vipulnsward/kwargs-avArthur Nogueira Neves2015-01-313-29/+29
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fixed test for deprecation warning in actionview for kwargs
| * | | | | | | Fixed test for deprecation warning in actionview, renaming from ↵Vipul A M2015-01-313-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/rails/rails/commit/baf14ae513337cb185acf865e93dfc48f3aabf6a
* | | | | | | | Merge pull request #18749 from JuanitoFatas/doc/fix-type-in-deprecationAndrew White2015-01-311-1/+1
|\ \ \ \ \ \ \ \ | |_|_|/ / / / / |/| | | | | | | Fix a typo in deprecation warning. #process takes method instead of http_method.
| * | | | | | | Fix a typo in deprecation warning. #process takes method instead of http_method.Juanito Fatas2015-01-311-1/+1
| | | | | | | |