aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | postgres, map scaled intervals to string datatype (#7518)Yves Senn2012-09-063-3/+6
| | | |
* | | | Minor refactor in ActiveRecord#initialize_dupCarlos Antonio da Silva2012-09-073-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | * There is no need to delete the primary key from cloned attributes, since it sets the same pk to nil afterwards. * Check for empty? instead of any? to run initialize callbacks.
* | | | create a transaction object and point AR objects at that object during aAaron Patterson2012-09-074-12/+55
| | | | | | | | | | | | | | | | transaction.
* | | | Fix AR tests due to builder change with nil values / empty stringsCarlos Antonio da Silva2012-09-071-6/+6
| | | | | | | | | | | | | | | | | | | | Check 0180e090ab6cbe66f7b521a0c03e278a0463accd for more reasoning about that.
* | | | Remove 3.2.x entries from Active Record changelog [ci skip]Carlos Antonio da Silva2012-09-071-100/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 810a50dacf9ddddc1d59c1cb350e8ce785c8bf85, the new policy is to keep old changelogs in their own branches, to avoid manual syncing across different branches. Please check that commit for more reasoning about the new policy.
* | | | Add Changelog entry for #4976: fix eager load associations without pks [ci skip]Carlos Antonio da Silva2012-09-071-0/+2
| | | |
* | | | Merge pull request #4976 from kreynolds/fix_eager_without_pkeyJon Leighton2012-09-072-1/+9
|\ \ \ \ | | | | | | | | | | Fix eagerly loading associations without primary keys
| * | | | Change JoinPart test from an integration to a unit testKelley Reynolds2012-07-052-13/+8
| | | | |
| * | | | Fix eagerly loading associations without primary keysKelley Reynolds2012-02-092-1/+14
| | | | |
* | | | | Update Active Record CHANGELOG for #7419Prem Sichanugrist2012-09-061-0/+6
| | | | |
* | | | | add mini-validator on creating migrationJan Bernacki2012-09-061-0/+9
| |/ / / |/| | | | | | | | | | | move validation to AR
* | | | Put the create_table block in a transaction.Rafael Mendonça França2012-09-051-2/+4
| | | | | | | | | | | | | | | | | | | | This will solve the issue that abort the connection transaction when we skip the tests.
* | | | ActiveRecord support to PostgreSQL 9.2 JSON typeDickson S. Guedes2012-09-059-4/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements the support to encode/decode JSON data to/from database and creating columns of type JSON using a native type [1] supported by PostgreSQL from version 9.2. [1] http://www.postgresql.org/docs/9.2/static/datatype-json.html
* | | | Add CHANGELOG entry for #7532 [ci skip]Rafael Mendonça França2012-09-051-0/+10
| | | |
* | | | Merge pull request #7532 from al2o3cr/fix_store_bugsRafael Mendonça França2012-09-053-4/+12
|\ \ \ \ | | | | | | | | | | correct handling of changes in AR::Store, combine multiple store_accessors
| * | | | correctly flag changed attributes in AR::Store, combine multiple calls to ↵Matt Jones2012-09-053-4/+12
| | | | | | | | | | | | | | | | | | | | store_accessor
* | | | | Merge pull request #7536 from pivotal/fix_pluck_with_reserved_wordsRafael Mendonça França2012-09-055-3/+21
|\ \ \ \ \ | | | | | | | | | | | | Fix pluck when columns/tables are reserved words.
| * | | | | Fix pluck when columns/tables are reserved words.Ian Lesperance2012-09-055-3/+21
| | | | | |
* | | | | | Merge pull request #7525 from ↵Rafael Mendonça França2012-09-052-9/+10
|\ \ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | | | | | | | seamusabshere/use-mysql-binary-for-rake-db-structure-load Use the 'mysql' binary for 'rake db:structure:load'
| * | | | | Use the 'mysql' binary for 'rake db:structure:load'.Seamus Abshere2012-09-052-9/+10
| |/ / / / | | | | | | | | | | | | | | | The previous implementation had the strange requirement that db/structure.sql contain only CREATE TABLE sql statements, one per table, separated by double newlines. SQLite3 and PostgreSQL database tasks, on the other hand, simply spawn 'sqlite3' and 'psql' binaries to load the file directly. The new implementation follows this and attempts to respect all current MySQL configuration settings.
* | | | | Merge pull request #7337 from adzap/string_to_dummy_timeRafael Mendonça França2012-09-053-1/+23
|\ \ \ \ \ | | | | | | | | | | | | Fix for time type columns with invalid time value
| * | | | | Update changelog with time column type casting fixAdam Meehan2012-09-051-0/+4
| | | | | |
| * | | | | Fix for time type columns with invalid timeAdam Meehan2012-09-052-1/+19
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | The string_to_dummy_time method was blindly parsing the dummy time string with Date._parse which returns a hash for the date part regardless of whether the time part is an invalid time string.
* | | | | Merge pull request #7447 from etehtsea/postgresql-adapterRafael Mendonça França2012-09-057-988/+1038
|\ \ \ \ \ | |/ / / / |/| | | | Modularize postgresql adapter
| * | | | Modularize postgresql adapterKonstantin Shabanov2012-09-057-988/+1038
| | |/ / | |/| |
* | | | test cleanup, remove ruby_type because it's no longer neededYves Senn2012-09-037-16/+5
| | | | | | | | | | | | | | | | | | | | All tests with a custom inheritance_column use the `Vegtable` model. The field ruby_type on the Company models is no longer needed
* | | | rewrite inheritance tests with a custom inheritance_columnYves Senn2012-09-034-49/+61
| | | | | | | | | | | | | | | | | | | | | | | | previously the tests with and without a custom `inheritance_column` used the same models. Since the model then has both fields this can lead to false positives.
* | | | set the configured #inheritance_column on #become (#7503)Yves Senn2012-09-035-2/+38
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I had to create a new table because I needed an STI table, which does not have both a "type" and a "custom_type" the test fails with: 1) Error: test_alt_becomes_works_with_sti(InheritanceTest): NoMethodError: undefined method `type=' for #<Cabbage id: 1, name: "my cucumber", custom_type: "Cucumber"> /Users/username/Projects/rails/activemodel/lib/active_model/attribute_methods.rb:432:in `method_missing' /Users/username/Projects/rails/activerecord/lib/active_record/attribute_methods.rb:100:in `method_missing' /Users/username/Projects/rails/activerecord/lib/active_record/persistence.rb:165:in `becomes' test/cases/inheritance_test.rb:134:in `test_becomes_works_with_sti' test/cases/inheritance_test.rb:140:in `test_alt_becomes_works_with_sti'
* | | Avoid #fetch for non-nil values.Jon Leighton2012-08-311-1/+2
| | | | | | | | | | | | | | | | | | This is purely a performance optimisation. See https://gist.github.com/3552829
* | | Key the attributes hash with symbolsJon Leighton2012-08-314-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | This is a performance/GC optimisation. In theory, this could be optimised by the implementation (last time I checked, this would have no effect on JRuby). But in practise, this make attribute access faster.
* | | Cache the connection pool for a given classJon Leighton2012-08-312-20/+37
| | |
* | | One hash is enoughJon Leighton2012-08-312-18/+14
| | | | | | | | | | | | We don't need separate @class_to_pool and @connection_pool hashes.
* | | Refactor connection handlerJon Leighton2012-08-311-22/+14
| | |
* | | Make connection pool retrieval fasterJon Leighton2012-08-313-20/+18
| | | | | | | | | | | | | | | | | | * Loop rather than recurse in retrieve_connection_pool * Key the hash by class rather than class name. This avoids creating unnecessary strings.
* | | Merge pull request #7481 from joliss/typoVijay Dev2012-08-301-3/+3
|\ \ \ | | | | | | | | Fix grammar
| * | | Fix grammarJo Liss2012-08-301-3/+3
| | | |
* | | | documents after_(commit|rollback)Xavier Noria2012-08-301-0/+18
|/ / /
* | | Add a test to make sure preloading properly merges association and default ↵Pratik Naik2012-08-283-0/+23
| | | | | | | | | | | | scope conditions
* | | CHANGELOGs are now per branchXavier Noria2012-08-281-6836/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes in old branches needed to be manually synched in CHANGELOGs of newer ones. This has proven to be brittle, sometimes one just forgets this manual step. With this commit we switch to CHANGELOGs per branch. When a new major version is cut from master, the CHANGELOGs in master start being blank. A link to the CHANGELOG of the previous branch allows anyone interested to follow the history.
* | | Merge pull request #7458 from frodsan/fix_orddep_basicsRafael Mendonça França2012-08-281-5/+5
|\ \ \ | | | | | | | | fix order dependent test in AR::BasicsTest
| * | | fix order dependent test in AR::BasicsTestFrancesco Rodriguez2012-08-271-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test https://github.com/rails/rails/blob/master/activerecord/test/cases/base_test.rb#L381 is failing because is not setting `CreditCard.pluralize_table_name` to `false`. In this case, i prefer to change to another model that is not in the `GUESSED_CLASSES` array.
* | | | ensures that the test repairs the validation setupFrancesco Rodriguez2012-08-271-7/+9
|/ / /
* | | fix order dependent test in AggregationsTestFrancesco Rodriguez2012-08-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ensure class variable is set to nil. It prevents the following test to fail: def test_do_not_run_the_converter_when_nil_was_set customers(:david).non_blank_gps_location = nil assert_nil Customer.gps_conversion_was_run end Check https://github.com/rails/rails/blob/master/activerecord/test/models/customer.rb#L7 for more information.
* | | Add test to ensure that save will raise SerializationTypeMismatch if theRafael Mendonça França2012-08-261-0/+6
| | | | | | | | | | | | serialized attribute value is not from the same class
* | | We don't need this reloadRafael Mendonça França2012-08-261-1/+1
| | |
* | | Use the Topic class in the attribute serialized testsRafael Mendonça França2012-08-261-8/+4
| | |
* | | Use teardown hook to return the initial state of the objectRafael Mendonça França2012-08-261-16/+5
| | |
* | | Move the serialized attribute tests to their own fileRafael Mendonça França2012-08-263-207/+214
| | |
* | | Move test to the correct fileRafael Mendonça França2012-08-263-12/+12
| | |
* | | Remove CHANGELOG entry for the update_attribute removal.Rafael Mendonça França2012-08-261-6/+0
| | | | | | | | | | | | We reverted the removal because the new deprecation policy