Commit Graph

4599 Commits

Author SHA1 Message Date
Aaron Patterson
4be0fc124a use a map and flatten to avoid << calls on array 2010-10-20 16:20:49 -07:00
Aaron Patterson
784177aeee only call column_methods_hash once, use array math for faster test of existence 2010-10-20 16:17:15 -07:00
Aaron Patterson
7f444a3db6 roll up weird method to meta programmed method 2010-10-20 15:51:44 -07:00
Aaron Patterson
fb835fc1e2 use zip + Hash.[] rather than looping with an index 2010-10-20 15:46:04 -07:00
Aaron Patterson
954bd126ec extract options is not necessary 2010-10-20 15:07:17 -07:00
Aaron Patterson
03d4b86e78 removing unused variable 2010-10-20 14:58:16 -07:00
Aaron Patterson
96e8e97e78 removing unused variables 2010-10-20 09:38:15 -07:00
Jan
21beedf1ff default scope merge where clauses [#5488 state:resolved] 2010-10-20 09:00:36 -07:00
Aaron Patterson
dbc5d2694f reduce duplicate where removal to one loop 2010-10-20 08:41:25 -07:00
Aaron Patterson
8c511c0b3c swap out some n^2 for some n 2010-10-19 20:53:53 -07:00
Aaron Patterson
8d5829f149 dup rather than create so many arrays 2010-10-19 17:51:46 -07:00
Aaron Patterson
dc16163d06 use array math rather than looping through the array 2010-10-19 17:46:54 -07:00
Aaron Patterson
c56fea2be4 use shortened version to generate a sql literal 2010-10-19 17:44:33 -07:00
Aaron Patterson
08636527b5 avoid cloning if we do not need to clone 2010-10-19 17:44:07 -07:00
Aaron Patterson
78b6f64105 avoid creating a proc object when possible 2010-10-19 17:37:55 -07:00
Aaron Patterson
d2898d4ef8 scopes can take an object that responds to call 2010-10-19 17:29:25 -07:00
Aaron Patterson
56be4c897a avoid creating the proc object if possible 2010-10-19 17:29:25 -07:00
Aaron Patterson
e68f339aae default scope can accept any object that responds to #call 2010-10-19 15:07:44 -07:00
Tim Morgan
b1b26af9a2 Allow default_scope to accept a Proc. 2010-10-19 14:43:31 -07:00
Anil Wadghule
d7799fadf9 Fix SQLite adapter name [#5842 state:resolved] 2010-10-19 10:44:59 -07:00
Aaron Patterson
1856e975c3 "instance_methods" includes public and protected 2010-10-19 08:30:45 -07:00
Michał Łomnicki
4120e95dce Use ALTER INDEX syntax to rename an index 2010-10-19 08:40:28 +08:00
Santiago Pastorino
460c4efd71 Merge CHANGELOGs from 3-0-stable 2010-10-18 12:24:41 -02:00
Santiago Pastorino
67df21f895 No need for parenthesis here 2010-10-17 12:34:51 -02:00
Neeraj Singh
f527f9097b no need to check for nil
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-10-17 12:26:47 -02:00
Neeraj Singh
ea14396c45 replace if ! with unless
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-10-17 12:26:32 -02:00
Aaron Patterson
dc76e3c38f should sort these ids before asserting they are equal! 2010-10-15 15:47:09 -07:00
Aaron Patterson
552636c652 testing that symbols work as sql literals 2010-10-15 15:46:13 -07:00
Xavier Noria
21ff8849bb in regexps, the dot in a character class is not a metacharacter 2010-10-15 16:31:00 +02:00
Carl Lerche
69789c3b29 #transaction on the instance level should take options as well 2010-10-14 21:27:40 -07:00
Michael Koziarski
9ebe582830 Revert 0c0b0aa0f2 which introduced a security vulnerability.
This addresses  CVE-2010-3933

Conflicts:

	activerecord/lib/active_record/nested_attributes.rb
2010-10-15 10:27:33 +13:00
Xavier Noria
13f7f89bda Merge branch 'master' of git://github.com/lifo/docrails 2010-10-14 23:15:23 +02:00
Piotr Sarnacki
f07cbec865 Do not treat information about skipped migrations as WARNINGs but as a NOTEs, also puts to stdin 2010-10-14 07:46:12 +02:00
Aaron Patterson
676a00163d clear any stale connections before messing with threaded tests 2010-10-13 16:58:03 -07:00
Carl Lerche
91ba75806f Update the ActiveRecord tests to not set unused options
This makes a test fail, but it is revealing a bug in Arel master.
2010-10-13 12:32:52 -07:00
Rafael Mendonça França
aec5ef243a Remove doc for debugging callbacks. Methods don't exist in Rails master 2010-10-13 15:59:57 -03:00
Carl Lerche
0b6af35ef0 Update the PostgreSQL adapter documentation 2010-10-13 11:49:32 -07:00
Carl Lerche
941844cbe5 rb_thread_select should always be used in DB drivers when available. 2010-10-13 11:40:47 -07:00
Jon Leighton
1ddbb216ea Delete unused methods in JoinAssociation 2010-10-13 08:24:19 -07:00
Jon Leighton
19304a9758 Renaming and formatting changes in JoinDependency 2010-10-13 08:24:19 -07:00
Jon Leighton
7dcb633427 Refactor JoinDependency and friends so that a JoinAssociation can produce an arbitrary number of joins, which will be needed in order to support nested through associations. 2010-10-13 08:24:19 -07:00
Jon Leighton
076b75bf98 Add some tests for functionality in JoinAssociation which already exists but was previously untested 2010-10-13 08:24:19 -07:00
Aaron Patterson
603406dc53 stop using deprecated arel API 2010-10-12 14:33:16 -07:00
Aaron Patterson
25a2909355 dry up column type testing 2010-10-12 13:13:19 -07:00
Aaron Patterson
4b2e16ed24 all columns respond to string_to_binary, so no need to check respond_to? 2010-10-12 13:10:52 -07:00
Aaron Patterson
5b5ae01f29 drying up true and false cases 2010-10-12 11:59:20 -07:00
Aaron Patterson
01893f43f6 reducing comparisons in when statements 2010-10-12 11:55:52 -07:00
Aaron Patterson
9852a72417 removing intermediate variables 2010-10-12 11:48:41 -07:00
Aaron Patterson
c882154cd1 reduce the number of times we test for the column variable 2010-10-12 11:45:59 -07:00
Aaron Patterson
0ca9c836c0 test quoting a string with an unknown column type 2010-10-12 11:43:50 -07:00