aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Preparing for 4.2.0.beta2 releaseRafael Mendonça França2014-09-261-1/+1
| | |
* | | ar/connection_pool: honor overriden rack.test in middlewareSimon Eskildsen2014-09-233-1/+14
| | | | | | | | | | | | | | | | | | | | | Honoring an overidden `rack.test` allows testing closed connection between multiple requests. This is useful if you're working on database resiliency, to ensure the connection is in the expected state from one request to another on the same worker.
* | | Update changelog with tenderlove's entryPrathamesh Sonpatki2014-09-231-1/+5
| | | | | | | | | | | | [ci skip]
* | | add a truncate method to the connectionAaron Patterson2014-09-226-0/+38
| |/ |/| | | | | | | | | it doesn't work on SQLite3 since it doesn't support truncate, but that's OK. If you call truncate on the connection, you're now bound to that database (same as if you use hstore or any other db specific feature).
* | Clarify the documentation of the primary_key option for associationsPeter Marsh2014-09-221-1/+1
| | | | | | | | | | | | | | Previously the documentation stated that `primary_key` should be the name of a *method* that returns the primary key used for the association. This is incorrect. This changes the documentation to say that the value must be the name of a column.
* | Better regression test for Fixtures with fk as a symbolArthur Neves2014-09-222-11/+2
| |
* | fix fixtures not loading if a belongs_to association is defined with a ↵Will Bryant2014-09-222-1/+10
| | | | | | | | :foreign_key option that's a symbol
* | Fix assertions in AR::TestCase::AttributeMethodsTestYuki Nishijima2014-09-211-3/+3
| | | | | | | | | | This test has always been green because it uses "assert" and the first argument is an truthy class/object.
* | Fix typo [ci skip]Yuki Nishijima2014-09-201-1/+1
| |
* | Merge pull request #16987 from jonatack/patch-8Yves Senn2014-09-201-13/+15
|\ \ | | | | | | | | | ActiveRecord CHANGELOG improvements [skip ci]
| * | ActiveRecord CHANGELOG improvements [skip ci]Jon Atack2014-09-201-13/+15
|/ /
* | No need to call to_sym hereGodfrey Chan2014-09-203-10/+10
| | | | | | | | | | The hash is now string-keyed, and [_]reflect_on_association calls `to_s` on the argument anyway.
* | Fix find_by with associations not working with adequate recordGodfrey Chan2014-09-202-0/+8
| | | | | | | | | | | | | | | | | | For now, we will just skip the cache when a non-column key is used in the hash. If the future, we can probably move some of the logic in PredicateBuilder.expand up the chain to make caching possible for association queries. Closes #16903 Fixes #16884
* | Quick fix to address the borken build caused by #15791Godfrey Chan2014-09-201-1/+1
| | | | | | | | | | | | This is pretty lame though, so feel free to send a PR with a better fix! ;) cc @zev @tenderlove
* | Merge pull request #15791 from zev/add_model_to_recordnotfound_messageAaron Patterson2014-09-192-18/+26
|\ \ | | | | | | Update RecordNotFound exception cases to include a message with the
| * | Update RecordNotFound exception cases to include a message with theZev Blut2014-06-182-18/+26
| | | | | | | | | | | | Model that the Record was not found in.
* | | Merge pull request #16973 from prathamesh-sonpatki/fixtures-featuresRafael Mendonça França2014-09-191-0/+3
|\ \ \ | | | | | | | | Updated comment about features of fixtures
| * | | Updated comment about features of fixturesPrathamesh Sonpatki2014-09-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | - Added a note about some features which are not dependent on auto-generated ID's. - [ci skip]
* | | | [ci skip] ActionRecord CHANGELOG docs fixeslethalbrains2014-09-191-18/+18
|/ / /
* | | Use #inject over #sum to build PG create DB statementGeoff Harcourt2014-09-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While investigating #16951 I found that another library's monkey-patching of `Enumerable` was causing the test migrations helper to break when trying to build the `CREATE DATABASE` statement. The prior approach used `#sum` to build the string from the options hash. As the code that combines the options to build the database statement is not user-facing, using `#inject` here instead will remove the only place where the database creation/migration code is dependent on ActiveSupport's monkey-patching of `Enumerable`.
* | | Use has_attribute?Rafael Mendonça França2014-09-171-1/+1
| | |
* | | Merge pull request #16875 from alan/dont_autosave_has_one_through_recordRafael Mendonça França2014-09-173-1/+31
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Don't autosave unchanged has_one through records Conflicts: activerecord/CHANGELOG.md
| * | | Don't autosave unchanged has_one through recordsAlan Kennedy2014-09-153-1/+31
| | | |
* | | | Merge pull request #16943 from sgrif/sg-fix-tz-converter-serializationRafael Mendonça França2014-09-175-3/+28
|\ \ \ \ | | | | | | | | | | Allow YAML serialization when using TZ aware attributes
| * | | | Allow YAML serialization when using TZ aware attributesSean Griffin2014-09-175-3/+28
| | | | |
* | | | | Merge pull request #16929 from ↵Rafael Mendonça França2014-09-171-0/+2
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | kongregate/fix-activerecord-deprecated_finders-find-symbol ActiveRecord deprecated finders are broken in 4.2
| * | | | Backwards compat for activerecord-deprecated_findersstopdropandrew2014-09-161-0/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Maintain compatibility for: * ActiveRecord::Base#find(:all) * ActiveRecord::Base#find(:first) * ActiveRecord::Base#find(:last)
* | | | do not dump foreign keys for ignored tables.Yves Senn2014-09-173-1/+8
| | | |
* | | | unify wording in Active Record CHANGELOG. [ci skip]Yves Senn2014-09-171-1/+1
| | | |
* | | | pg, correctly dump foreign keys targeting tables in a different schema.Yves Senn2014-09-173-1/+35
|/ / / | | | | | | | | | | | | | | | Closes #16907. [Matthew Draper & Yves Senn]
* | | Merge pull request #13656 from chanks/rollback_transactions_in_killed_threadsMatthew Draper2014-09-143-5/+50
|\ \ \ | | | | | | | | | | | | Data corruption risk: Roll back open transactions when the running thread is killed.
| * | | Roll back open transactions when the running thread is killed.Chris Hanks2014-08-222-1/+36
| | | |
* | | | Merge pull request #16669 from aantix/dangerous_attribute_error_better_messageRafael Mendonça França2014-09-121-1/+1
|\ \ \ \ | | | | | | | | | | Improved the error messaging for the DangerousAttributeError exception
| * | | | Changed the DangerousAttributeError exception message to include messaging ↵Jim Jones2014-09-101-1/+1
| | | | | | | | | | | | | | | | | | | | that the conflict could be because of a conflicting attribute.
* | | | | pg, add test cases for updateable views.Yves Senn2014-09-111-0/+45
| | | | |
* | | | | reuse view test-cases for pg materialized view tests.Yves Senn2014-09-112-67/+36
| | | | |
* | | | | switch `assert_operator` arguments as discussed in #16860.Yves Senn2014-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | Working with two different machines is hard :sweat:
* | | | | A `NullRelation` should represent nothing. Closes #15176.Yves Senn2014-09-114-2/+18
|/ / / / | | | | | | | | | | | | | | | | | | | | [Matthew Draper & Yves Senn] Closes #16860. (pull request to discuss the implementation)
* | | | Merge pull request #16839 from chancancode/default_test_orderRafael Mendonça França2014-09-101-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | Default to sorting user's test cases for now
| * | | | Default to sorting user's test cases for nowGodfrey Chan2014-09-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Goals: 1. Default to :random for newly generated applications 2. Default to :sorted for existing applications with a warning 3. Only show the warning once 4. Only show the warning if the app actually uses AS::TestCase Fixes #16769
* | | | | Speed up schema dumper testsJeremy Kemper2014-09-101-11/+9
| | | | | | | | | | | | | | | | | | | | Dump the standard schema once instead of redoing it per test
* | | | | Include default column limits in schema.rbJeremy Kemper2014-09-103-8/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows :limit defaults to be changed without pulling the rug out from under old migrations that omitted :limit because it matched the default at the time.
* | | | | MySQL: schema.rb now includes TEXT and BLOB column limits.Jeremy Kemper2014-09-103-8/+15
| | | | |
* | | | | MySQL: correct LONGTEXT and LONGBLOB limits from 2GB to their true 4GBJeremy Kemper2014-09-103-4/+8
| | | | |
* | | | | Merge pull request #16379 from JackDanger/update-preloader-documentationRafael Mendonça França2014-09-101-23/+32
|\ \ \ \ \ | | | | | | | | | | | | Updating Associations::Preloader docs
| * | | | | Updating Associations::Preloader docsJack Danger Canty2014-08-171-23/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Much of the previous documentation introduced features new in 2011. This commit refreshes it to provide clearer code examples and spends more time describing the normal case (preloaded associations) and less time describing the fallback. [ci skip]
* | | | | | Replace drop sql statement to drop_table methodYasuo Honda2014-09-113-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | to drop sequences at the same time each tables dropped for Oracle
* | | | | | Oracle does not support `IF EXISTS` for `DROP VIEW`.Yves Senn2014-09-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | /cc @yahonda
* | | | | | models backed by views don't assume "id" columns are the primary key.Yves Senn2014-09-091-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #10247. The same goes for tables with an "id" column but without primary key constraint. Reading from the view works without configuration. If you have an updateable view you need to use `self.primary_key = ''`.
* | | | | | add test-cases for primary-key-less-views. Closes #16555.Yves Senn2014-09-091-0/+43
| | | | | |