aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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-141-1/+4
| | | | 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-141-50/+90
| | | | | | 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-143-18/+28
| | | | | | #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-134-8/+19
| | | | | | 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-131-22/+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 eager loading with pre-quoted table names. Closes #11046 ↵Michael Koziarski2008-02-111-2/+2
| | | | | | [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-101-2/+1
| | | | | | 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-101-1/+1
| | | | | | 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 Time Zone support to ActiveRecord, and config.time_zone property for ↵Rick Olson2008-02-062-6/+48
| | | | | | 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-032-15/+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-021-0/+14
| | | | | | 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-021-1/+1
| | | | | | [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-021-1/+1
| | | | | | 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-311-1/+2
| | | | | | 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-301-1/+1
| | | | | | string. Closes #10963. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8757 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make sure count works on has_many :through associations using :group. ↵Michael Koziarski2008-01-272-0/+15
| | | | | | 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-261-1/+1
| | | | | | #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-261-0/+2
| | | | 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
* 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
* Merge branch 'ar-test-cleanup' of git://git.geeksomnia.com/railsJeremy Kemper2008-01-211-0/+35
| | | | 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-191-0/+19
| | | | 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-194-4/+248
| | | | 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-192-0/+65
| | | | 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-192-126/+37
| | | | | | 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
* Ensure that modifying has_and_belongs_to_many actions clear the query cache. ↵Rick Olson2008-01-181-5/+5
| | | | | | Closes #10840 [john.andrews] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8653 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Correct fix for [8647], Closes #6868. [isak]Michael Koziarski2008-01-161-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8650 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Don't ignore :precision and :scale when adding columns on postgresql. Closes ↵Michael Koziarski2008-01-161-2/+3
| | | | | | #6868 [w.piekutowski] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8647 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fix issue where Table#references doesn't pass a :null option to a *_type ↵Rick Olson2008-01-111-3/+1
| | | | | | attribute for polymorphic associations. Closes #10753 [railsjitsu] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8627 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* observed_subclasses gives [] if there are no observed classesJeremy Kemper2008-01-091-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8602 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixtures: removed support for the ancient pre-YAML file format. Closes #10736.Jeremy Kemper2008-01-081-36/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8594 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Ruby 1.9 compat: instance_eval binding to get the record binding instead of ↵Jeremy Kemper2008-01-061-1/+1
| | | | | | accidentally getting current Kernel#binding. Closes #10716 [Dirkjan Bussink] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8575 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* More thoroughly quote table names. Exposes some issues with sqlite2 adapter. ↵Jeremy Kemper2008-01-0511-37/+51
| | | | | | Closes #10698. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8571 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* * Continue evolution toward ActiveSupport::TestCase and friends. #10679 ↵Jeremy Kemper2008-01-051-82/+67
| | | | | | | | | [Josh Peek] * TestCase: introduce declared setup and teardown callbacks. Pass a list of methods and an optional block to call before setup or after teardown. Setup callbacks are run in the order declared; teardown callbacks are run in reverse. [Jeremy Kemper] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8570 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Document that .build doesn't apply to has_many :through associations. Closes ↵Jeremy Kemper2008-01-051-1/+1
| | | | | | #10707 [GMFlash] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8562 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Prefer to instantiate fixtures with model classes instead of their names, ↵Jeremy Kemper2008-01-051-13/+14
| | | | | | avoiding excess constant lookups. Closes #10677 [nwilmes] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8561 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Cache fixture model class. References #10677 [nwilmes]Jeremy Kemper2008-01-051-2/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8560 5ecf4fe2-1ee6-0310-87b1-e25e094e27de