aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Do not use instantiated fixtures (in general) in tests. Also, support the ↵Jamis Buck2005-06-101-2/+17
| | | | | | use of transactional fixtures by setting the AR_TX_FIXTURES environment variable to "yes". git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1399 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Eager loading of dependent has_one associations won't delete the association ↵Jamis Buck2005-06-101-1/+1
| | | | | | #1212. Also, starting to refactor the tests to make them speedier, with optional support for transactional fixtures. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1398 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Sort the migration files explicitly so that they are always ordered correctly.Jamis Buck2005-06-071-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1394 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Replace the in-memory object, but dont orphan the existing oneDavid Heinemeier Hansson2005-06-071-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1393 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added a second parameter to the build and create method for has_one that ↵David Heinemeier Hansson2005-06-062-3/+22
| | | | | | controls whether the existing association should be replaced (which means nullifying its foreign key as well). By default this is true, but false can be passed to prevent it. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1392 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Using transactional fixtures now causes the data to be loaded only once, for ↵Jamis Buck2005-06-031-2/+8
| | | | | | BIG speed improvements git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1384 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added fixture accessors that can be used when fixture instantiation is ↵Jamis Buck2005-06-031-2/+28
| | | | | | disabled, "model_name(:fixture_name)" git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1383 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added note of limitation for #1279David Heinemeier Hansson2005-05-211-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1347 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Errors#add_on_blank which works like Errors#add_on_empty, but uses ↵David Heinemeier Hansson2005-05-211-6/+15
| | | | | | Object#blank? instead. CHANGED: validates_presence_of now uses Errors#add_on_blank, which will make " " fail the validation where it didnt before #1309. Added that " " is now also blank? (using strip if available) git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1346 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added the :if option to all validations that can either use a block or a ↵David Heinemeier Hansson2005-05-211-5/+66
| | | | | | method pointer to determine whether the validation should be run or not. #1324 [Duane Johnson/jhosteny] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1340 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Speed up timestamping a tad #1227 [skaen]David Heinemeier Hansson2005-05-191-8/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1327 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed use of construct_finder_sql when using :join #1288 [dwlt@dwlt.net]David Heinemeier Hansson2005-05-191-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1316 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that :delete_sql in has_and_belongs_to_many associations couldn't ↵David Heinemeier Hansson2005-05-192-2/+4
| | | | | | access record properties #1299 [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1313 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed docs for scaffolding generator #1303 [thijs@vandervossen.net]David Heinemeier Hansson2005-05-191-2/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1312 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that clone would break when an aggregate had the same name as one of ↵David Heinemeier Hansson2005-05-191-12/+25
| | | | | | its attributes #1307 [bitsweat] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1309 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Changed the callbacks such that observers are notified before the in-object ↵David Heinemeier Hansson2005-05-022-4/+16
| | | | | | callbacks are triggered. Without this change, it wasn't possible to act on the whole object in something like a before_destroy observer without having the objects own callbacks (like deleting associations) called first. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1273 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Started work on a per-request query cacheDavid Heinemeier Hansson2005-05-022-0/+66
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1267 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added option for passing an array to the find_all version of the dynamic ↵David Heinemeier Hansson2005-05-021-1/+9
| | | | | | finders and have it evaluated as an IN fragment git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1266 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed association picture referenceDavid Heinemeier Hansson2005-04-301-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1264 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added compatibility with camelCase column names for dynamic finders #533 ↵David Heinemeier Hansson2005-04-301-1/+1
| | | | | | [Dee.Zsombor] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1263 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed extraneous comma in count() function that made it not work with joins ↵David Heinemeier Hansson2005-04-301-3/+2
| | | | | | #1156 [jarkko/Dee.Zsombor] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1262 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed incompatibility with Base#find with an array of ids that would fail ↵David Heinemeier Hansson2005-04-301-1/+1
| | | | | | when using eager loading #1186 [Alisdair McDiarmid] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1259 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that validate_length_of lost :on option when :within was specified ↵David Heinemeier Hansson2005-04-301-3/+5
| | | | | | #1195 [jhosteny@mac.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1258 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added encoding and min_messages options for PostgreSQL #1205 [shugo]David Heinemeier Hansson2005-04-301-0/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1255 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed acts_as_list where deleting an item that was removed from the list ↵David Heinemeier Hansson2005-04-251-8/+22
| | | | | | would ruin the positioning of other list items #1197 [Jamis Buck] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1237 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added validates_exclusion_of as a negative of validates_inclusion_ofDavid Heinemeier Hansson2005-04-241-0/+25
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1236 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Optimize counting of has_many associations by setting the association to ↵David Heinemeier Hansson2005-04-231-1/+5
| | | | | | empty if the count is 0 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1235 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Dont reload on empty associationsDavid Heinemeier Hansson2005-04-191-2/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1231 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed order of loading in eager associationsDavid Heinemeier Hansson2005-04-192-10/+20
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1229 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that :get, :post, and the others should take a flash array as the ↵David Heinemeier Hansson2005-04-191-0/+3
| | | | | | third argument just like process #1144 [rails@cogentdude.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1227 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added documentation about :limit not working with eager loadingDavid Heinemeier Hansson2005-04-191-3/+6
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1224 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed stray comma when using eager loading and ordering together from ↵David Heinemeier Hansson2005-04-191-1/+7
| | | | | | has_many associations #1143 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1220 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed documentation and prepared for release of 0.12David Heinemeier Hansson2005-04-182-7/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1216 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base.save! that attempts to save the record just like Base.save but ↵David Heinemeier Hansson2005-04-181-0/+9
| | | | | | will raise a InvalidRecord exception instead of returning false if the record is not valid [After much pestering from Dave Thomas] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1215 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Speeded up eager loading a whole bunchDavid Heinemeier Hansson2005-04-184-52/+52
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1212 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Updated documentation here and thereDavid Heinemeier Hansson2005-04-182-12/+9
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1210 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added documentation for new Base.find API and eager association loadingDavid Heinemeier Hansson2005-04-182-7/+55
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1209 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed PostgreSQL usage of fixtures with regards to public schemas and table ↵David Heinemeier Hansson2005-04-181-2/+2
| | | | | | names with dots #962 [gnuman1@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1206 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that fixtures were being deleted in the same order as inserts causing ↵David Heinemeier Hansson2005-04-181-7/+14
| | | | | | FK errors #890 [andrew.john.peters@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1205 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Move nodoc to the individual methodsDavid Heinemeier Hansson2005-04-181-4/+4
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1204 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Refactored a bitDavid Heinemeier Hansson2005-04-181-5/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1202 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Changed habtm eager loading to also use joinsDavid Heinemeier Hansson2005-04-181-26/+10
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1201 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixes for postgresql testing #1129, #1130, #1131David Heinemeier Hansson2005-04-181-10/+17
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1199 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made the dynamic finders use the new find API and updated the examples here ↵David Heinemeier Hansson2005-04-171-17/+26
| | | | | | and there git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1196 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixes a problem with the SQL Adapter which was resulting in IDENTITY_INSERT ↵David Heinemeier Hansson2005-04-171-2/+1
| | | | | | not being set to ON when it should be #1104 [adelle] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1192 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added the option to specify the acceptance string in validates_acceptance_of ↵David Heinemeier Hansson2005-04-171-3/+5
| | | | | | #1106 [caleb@aei-tech.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1188 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added acts_as_nested_set #1000 [wschenk]David Heinemeier Hansson2005-04-172-0/+214
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1185 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added insert_at(position) to acts_as_list #1083 [DeLynnB]David Heinemeier Hansson2005-04-171-4/+28
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1179 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Cleaned up validates_length_of by calling existing validations on the common ↵David Heinemeier Hansson2005-04-171-29/+17
| | | | | | stuff #1108 [caleb@aei-tech.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1178 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Dont prefix on updates and deletes, only selectsDavid Heinemeier Hansson2005-04-171-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1177 5ecf4fe2-1ee6-0310-87b1-e25e094e27de