aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #16481 from sgrif/sg-change-default-timestampsDavid Heinemeier Hansson2014-08-1713-26/+104
|\ | | | | Change the default `null` value for timestamps
| * Change the default `null` value for timestampsSean Griffin2014-08-1213-26/+104
| | | | | | | | | | | | | | As per discussion, this changes the model generators to specify `null: false` for timestamp columns. A warning is now emitted if `timestamps` is called without a `null` option specified, so we can safely change the behavior when no option is specified in Rails 5.
* | Merge pull request #16294 from bf4/code_toolsRafael Mendonça França2014-08-171-21/+3
|\ \ | | | | | | Update, unify, encapsulate, and fix various code tools in Rails
| * | Encapsulate rake lines from ActiveRecord/ActionPack as CodeTools::LineStatisticsBenjamin Fleischer2014-07-251-21/+3
| | | | | | | | | | | | [ci skip]
* | | Merge pull request #16458 from chancancode/ar_fix_reserved_inheritanceGodfrey Chan2014-08-173-5/+34
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Fixed issue w/custom accessors + reserved name + inheritance Conflicts: activerecord/CHANGELOG.md
| * | | Fixed issue w/custom accessors + reserved name + inheritanceGodfrey Chan2014-08-113-5/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed an issue where custom accessor methods (such as those generated by `enum`) with the same name as a global method are incorrectly overridden when subclassing. This was partially fixed in 4155431 then broken again by e5f15a8. Fixes #16288.
* | | | Don't expose these new APIs yet (added in 877ea78 / #16189)Godfrey Chan2014-08-162-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | WARNING: don't use them! They might change or go away between future beta/RC/ patch releases! Also added a CHANGELOG entry for this.
* | | | Implement `_was` and `changes` for in-place mutations of AR attributesSean Griffin2014-08-167-18/+46
| | | |
* | | | Merge pull request #16517 from sgrif/sg-comparable-attributesRafael Mendonça França2014-08-164-0/+50
|\ \ \ \ | | | | | | | | | | Implement `==` on `Type::Value` and `Attribute`
| * | | | Implement `==` on `Type::Value` and `Attribute`Sean Griffin2014-08-154-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | This was a small self contained piece of the refactoring that I am working on, which required these objects to be comparable.
* | | | | Fix regression on after_commit in nested transactions.Arthur Neves2014-08-153-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after_commit should not run in nested transactions, however they should run once the outermost transaction gets committed. This patch fixes the problem copying the records from the Savepoint to its parent. So the RealTransaction will have all records that needs to run callbacks on it. [fixes #16425]
* | | | | Use *_transaction methods in TransactionManagerArthur Neves2014-08-152-4/+26
|/ / / / | | | | | | | | | | | | | | | | | | | | Use `commit_transaction`/`rollback_transaction` on `within_new_transaction` method, so they make sure they `pop` the transaction from the stack before calling the methods `commit`/`rollback`.
* | | | fix typo in method name (broken build :sweat:)Yves Senn2014-08-151-1/+1
| | | |
* | | | prefer `has_attribute?` over `attributes.key?`.Yves Senn2014-08-151-1/+1
| | | | | | | | | | | | | | | | Follow up to the discussion on #16505.
* | | | Merge pull request #16505 from sgrif/sg-attribute-internalsYves Senn2014-08-151-2/+3
|\ \ \ \ | | | | | | | | | | Use the method for determining attribute methods rather than duplicating
| * | | | Use the method for determining attribute methods rather than duplicatingSean Griffin2014-08-151-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've been trying to reduce the number of places that care about `attributes`, and its existence. We have a method for this check, let's use it instead.
* | | | | create_table + transactional_fixtures = :bomb:Akira Matsuda2014-08-151-0/+4
| | | | |
* | | | | Spelling errorsjbsmith862014-08-143-4/+4
|/ / / /
* | | | Ignore MySQL "SHOW VARIABLES" when counting queriesAkira Matsuda2014-08-151-1/+1
| | | |
* | | | Be sure to reset PK name renamed in the testAkira Matsuda2014-08-151-0/+3
| | | |
* | | | Use string for order argument, fixed from #16501 [ci skip]Zachary Scott2014-08-141-1/+1
| | | |
* | | | Merge pull request #16501 from tomkadwill/update_delete_to_new_styleZachary Scott2014-08-141-1/+1
|\ \ \ \ | | | | | | | | | | [ci skip] updated 'where' in association documention to new style syntax
| * | | | [ci skip] updated 'where' in association documention to new style syntaxTom Kadwill2014-08-141-1/+1
| | | | |
* | | | | Warm up Symbols with where methodAkira Matsuda2014-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | Looks like #first wasn't warm enough...
* | | | | Merge pull request #16502 from bogdan/where-hash-nested-relationSantiago Pastorino2014-08-142-3/+24
|\ \ \ \ \ | | | | | | | | | | | | [Regression 4.0 -> 4.1] Fixed AR::Relation#where edge case with Hash and other Relation
| * | | | | Fixed AR::Relation#where edge case with Hash and other RelationBogdan Gusiev2014-08-142-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example: Author.where(posts: { author_id: Author.where(country_id: 1) }).joins(:posts)
* | | | | | Ignore SCHEMA queries in some habtm testsAkira Matsuda2014-08-141-4/+4
| | | | | |
* | | | | | Merge pull request #8813 from ↵Yves Senn2014-08-143-1/+26
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | greyblake/dont_write_timestamps_if_they_are_not_attributes Write timestamps only if there are timestamps columns Conflicts: activerecord/CHANGELOG.md
| * | | | | | Do not try to write timestamps if they are missing #8813Potapov Sergey2014-02-163-1/+29
| | | | | | |
* | | | | | | Make sure that fixtures are loaded before findingAkira Matsuda2014-08-141-0/+4
| | | | | | |
* | | | | | | FormatAkira Matsuda2014-08-141-2/+2
| | | | | | |
* | | | | | | Clear validators before and after each testAkira Matsuda2014-08-142-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Or some tests fail when run in random order
* | | | | | | Finally! None of our tests are order_dependent!Akira Matsuda2014-08-141-5/+0
| | | | | | |
* | | | | | | Merge pull request #16491 from akshay-vishnoi/doc-changesYves Senn2014-08-133-4/+4
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | [ci skip] fix spelling of overridden
| * | | | | | | [ci skip] fix spelling of overrideAkshay Vishnoi2014-08-133-4/+4
| | |_|_|_|_|/ | |/| | | | |
* | | | | | | Merge pull request #16489 from tomkadwill/updating_options_to_new_styleYves Senn2014-08-131-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | [ci skip] Updated where scope documentation to conform to new style
| * | | | | | | [ci skip] Updated where scope to conform to new styleTom Kadwill2014-08-131-1/+1
| | |_|_|/ / / | |/| | | | |
* | | | | | | `index_exists?` with `:name` checks specified columns.Yves Senn2014-08-133-7/+30
| |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Yves Senn & Matthew Draper] The column check was embodied in the defaul index name. If the :name option was used, the specified columns were not verified at all. Given: ``` assert connection.index_exists?(table_name, :foo_id, :name => :index_testings_on_yo_momma) ``` That index could have been defined on any field, not necessarily on `:foo_id`.
* | | | | | :bomb:Rafael Mendonça França2014-08-121-1/+1
| | | | | |
* | | | | | Nobody sucks so nobody should call this awful method nameRafael Mendonça França2014-08-121-1/+1
|/ / / / /
* | | | | users_dont_suck_but_only_we_suck_and_only_our_tests_are_order_dependent!Akira Matsuda2014-08-121-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Calling ActiveSupport::TestCase.i_suck_and_my_tests_are_order_dependent! in AS::TestCase makes everyone's tests order dependent, which should never be done by the framework.
* | | | | update error message to reflect that the record could have been destroyedlsylvester2014-08-112-1/+8
| |_|/ / |/| | |
* | | | Merge pull request #16441 from ↵Santiago Pastorino2014-08-091-4/+4
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | tomkadwill/activerecord_associations_options_param [ci skip] Changed options to +options+ for rdoc
| * | | | [ci skip] Changed options to +options+ for rdocTom Kadwill2014-08-091-4/+4
| | | | |
* | | | | Using delegated connection methodJoshua Delsman2014-08-081-1/+1
|/ / / /
* | | | [ci skip] Changed 'first argument' to '+name+ argument'Tom Kadwill2014-08-081-4/+4
| | | |
* | | | Rephrase how we explain RecordInvalid exception in the context ofZachary Scott2014-08-071-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | `#create!` regarding validations in contrast to the behavior of `#create`. Also describe creating multiple objects using an array of hashes as the +attributes+ parameter. [ci skip] /cc #16384
* | | | Merge pull request #16384 from tomkadwill/improved_create_documentationZachary Scott2014-08-071-2/+5
|\ \ \ \ | | | | | | | | | | [ci skip] Added +object+ and +attributes+ to create! description for rdoc
| * | | | [ci skip] Updated create! documentation description and added +attributes+ ↵Tom Kadwill2014-08-071-2/+5
| | | | | | | | | | | | | | | | | | | | for rdoc
* | | | | use the uri parser so that newer version of Ruby workAaron Patterson2014-08-071-1/+1
| | | | |