aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
* ActiveRecord::Base#instantiate_time_object only uses Time.zone when ↵Geoff Buesing2008-02-163-2/+19
| | | | | | Base.time_zone_aware_attributes is true; leverages Time#time_with_datetime_fallback for readability git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8882 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactor ActiveRecord::ConnectionAdapters::Column.new_time: leverage ↵Geoff Buesing2008-02-162-6/+4
| | | | | | DateTime failover behavior of Time#time_with_datetime_fallback git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8881 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add test for Observer#observer_class and change the implementation slightly. ↵Michael Koziarski2008-02-152-3/+7
| | | | | | Closes #11099 [ernesto.jimenez] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8875 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Revert [8865], broke AP record identifier. Reopens #11109.Jeremy Kemper2008-02-154-31/+19
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8874 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix typo in migration test. Closes #11105 [h-lame]Jeremy Kemper2008-02-151-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8873 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Avoid repeated calls to Base#connection. Closes #11111 [adymo]Michael Koziarski2008-02-141-2/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8871 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Optimisation for BigDecimal conversion code. Closes #11110 [adymo]Michael Koziarski2008-02-142-1/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8870 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Minor formatting changesMichael Koziarski2008-02-142-6/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8869 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve associations performance by using symbol callbacks instead of string ↵Rick Olson2008-02-142-50/+92
| | | | | | callbacks. Closes #11108 [adymo] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8867 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improve associations performance by avoiding named block arguments. Closes ↵Rick Olson2008-02-144-18/+30
| | | | | | #11109 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8865 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Introduce the :readonly option to all associations. Records from the ↵Jeremy Kemper2008-02-139-11/+48
| | | | | | association cannot be saved. Closes #11084. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8864 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove options from the attributes method, tidy up the implementation. ↵Michael Koziarski2008-02-132-39/+5
| | | | | | Closes #11093 [juanjo.bazan, Koz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8863 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Avoid cloning in Base#attributes_before_typecast. Closes #11077 [juanjo.bazan]Michael Koziarski2008-02-111-3/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8858 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix the pre-quoted table names in the eager tests. [mislav]Michael Koziarski2008-02-111-2/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8857 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix eager loading with pre-quoted table names. Closes #11046 ↵Michael Koziarski2008-02-112-2/+26
| | | | | | [danielmorrison, Koz, Jeremy Kemper] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8856 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Multiparameter attributes for time columns fail over to DateTime when out of ↵Geoff Buesing2008-02-103-2/+14
| | | | | | range of Time git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8855 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* TimeZone#new renamed #local, so that new TimeWithZone instances can be ↵Geoff Buesing2008-02-102-1/+3
| | | | | | created via Time.zone.local() git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8847 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Show RecordInvalid in the documentation. References #10976 [kampers]Michael Koziarski2008-02-101-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8845 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove misleading / incorrect warning from validation documentation. Closes ↵Michael Koziarski2008-02-091-11/+0
| | | | | | #8241 [quixoten, pedz, tom] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8825 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Avoid cloning in Base#attributes. Closes #11047 [juanjo.bazan]Michael Koziarski2008-02-081-7/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8824 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add uses_tzinfo to active record tests to prevent breaking the cc.rb build ↵Michael Koziarski2008-02-063-58/+70
| | | | | | etc. Closes #11034 [mpalmer] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8808 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add Time Zone support to ActiveRecord, and config.time_zone property for ↵Rick Olson2008-02-065-8/+163
| | | | | | specifying a default Time Zone. Closes #10982 [Geoff Buesing, rick] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8806 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make the docs reference the correct function. [Tobi Reif]Michael Koziarski2008-02-041-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8802 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL: memoize column and table name quoting to reduce garbageJeremy Kemper2008-02-031-7/+8
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8794 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Revert r8742: remove has_many with :group option since it has sketchy sql ↵Jeremy Kemper2008-02-034-31/+0
| | | | | | support. Closes #10480. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8790 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Reshuffle load order so that routes and observers are initialized after ↵Rick Olson2008-02-022-0/+16
| | | | | | plugins and app initializers. Closes #10980 [rick, fxn] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8787 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix calculations on associations with custom :foreign_key. Closes #8117 ↵Jeremy Kemper2008-02-023-1/+33
| | | | | | [kamal, jack] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8778 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* When multiparameter date assignment fails due to an invalid date, fall back ↵Jeremy Kemper2008-02-021-1/+17
| | | | | | to create a Time and convert to_date. Closes #10556 [leikind] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8777 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix has_many :through a polymorphic has_many. Closes #10529 [Aleksey ↵Jeremy Kemper2008-02-027-3/+32
| | | | | | Kondratenko] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8776 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Avoid Base#attributes when saving / creating records. Closes #10978 [adymo]Michael Koziarski2008-02-011-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8770 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed preloading belongs_to associations which reference a custom foreign ↵Jeremy Kemper2008-01-318-3/+50
| | | | | | key. References #9640. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8762 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* MySQL: omit text/blob defaults from the schema instead of using an empty ↵Jeremy Kemper2008-01-304-9/+5
| | | | | | string. Closes #10963. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8757 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add posts.comments_count for other databases. Closes #10804.Jeremy Kemper2008-01-281-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8745 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make sure count works on has_many :through associations using :group. ↵Michael Koziarski2008-01-274-0/+31
| | | | | | Closes #10480 [remvee] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8742 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove dead attr_reader from association proxy. Closes #10668 [danger]Michael Koziarski2008-01-261-1/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8737 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make sure that belongs_to counter decrements when assigning nil Closes ↵Michael Koziarski2008-01-266-4/+18
| | | | | | #10804 [jeanmartin] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8735 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add tests and documentation for allow_blank. Closes #10651 [blj]Michael Koziarski2008-01-262-0/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8733 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Indicate in documentation that newer version of AR support eager loading in ↵Marcel Molina2008-01-231-1/+5
| | | | | | polymorphic associations. Closes #10861 [fxn] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8707 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* require test/unit explicitly otherwise the at_exit handler doesn't get ↵Michael Koziarski2008-01-221-0/+1
| | | | | | called [jbarnette] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8690 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add options missing from earlier changesetMichael Koziarski2008-01-221-2/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8688 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Add missing author_addresses.yml fixture. Closes #10592.Jeremy Kemper2008-01-211-0/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8682 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Merge branch 'ar-test-cleanup' of git://git.geeksomnia.com/railsJeremy Kemper2008-01-2170-320/+296
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8681 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* belongs_to supports :dependent => :destroy and :delete. Closes #10592.Jeremy Kemper2008-01-197-4/+56
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8675 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Introduce preload query strategy for eager :includes. Closes #9640.Jeremy Kemper2008-01-199-15/+351
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8672 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Support aggregations in finder conditions. Closes #10572.Jeremy Kemper2008-01-194-1/+244
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8671 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove dead code. Closes #10698 [garru]Jeremy Kemper2008-01-191-5/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8670 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Extract ActiveSupport::Callbacks from Active Record, test case setup and ↵Jeremy Kemper2008-01-193-127/+38
| | | | | | teardown, and ActionController::Dispatcher. Closes #10727. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8664 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Remove table quoting; only pull last_insert_id if there's a primary key.Jeremy Kemper2008-01-191-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8663 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Organize and clean up the Active Record test suite. Closes #10742.Jeremy Kemper2008-01-181-0/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8662 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix pathsJeremy Kemper2008-01-1843-203/+203
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de