aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
* indent fix [ci skip]Vijay Dev2012-09-091-1/+1
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-09-092-2/+2
|\ | | | | | | | | Conflicts: activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
| * add :nodoc: to AR::Store::IndifferentCoder [ci skip]Francesco Rodriguez2012-09-081-1/+1
| |
| * Fix a typoAndreas Loupasakis2012-09-061-1/+1
| |
| * Fix indenentation in comment to stop the end of comment from appearing in a ↵Anuj Dutta2012-09-031-1/+1
| | | | | | | | <pre> block.
* | Merge pull request #7571 from arunagw/warning_removed_shadowingRafael Mendonça França2012-09-091-1/+1
|\ \ | | | | | | removed warning: shadowing outer local variable
| * | removed warning: shadowing outer local variableArun Agrawal2012-09-091-1/+1
| | |
* | | Raise MissingAttributeError on query methodsErnie Miller2012-09-083-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When calling a query method on an attribute that was not selected by an ActiveRecord query, an ActiveModel::MissingAttributeError is not raised. Instead, a nil value is returned, which will return false once cast to boolean. This is undesirable, as we should not give the impression that we know the attribute's boolean value when we haven't loaded the attribute's (possibly) non-boolean value from the database. This issue is present on versions going back as far as 2.3, at least.
* | | improve AR CHANGELOG [ci skip]Francesco Rodriguez2012-09-081-8/+9
| | |
* | | Improve latest AR and AP changelog entriesCarlos Antonio da Silva2012-09-081-1/+4
| | |
* | | Refactor nested attributes limit logic to lookup :limit option only onceCarlos Antonio da Silva2012-09-081-11/+12
| | |
* | | Dump schema using new style hashKonstantin Shabanov2012-09-084-58/+60
|/ /
* | Add changelog entry for #7545: map interval with precision to stringCarlos Antonio da Silva2012-09-071-0/+2
| | | | | | | | | | Merged in f41dba27a411fe3e2ddeb8d9ab6856dbb23acd02 [ci skip]
* | Merge pull request #7545 from senny/7518_postgres_type_detectionAaron Patterson2012-09-073-3/+6
|\ \ | | | | | | postgres, map scaled intervals to string datatype
| * | 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
| | |