Commit Graph

4063 Commits

Author SHA1 Message Date
Łukasz Strzałkowski
010eda2eb5 Removed warnings about method redefining 2010-07-19 23:44:48 +08:00
Łukasz Strzałkowski
247886e1b4 Removed warnings when a variable is shadowed 2010-07-19 23:44:45 +08:00
José Valim
b22c11fa53 Add missing entries and tidy up CHANGELOG. 2010-07-19 15:14:26 +02:00
Neeraj Singh
0fce4ae57f expected value should come first in assert_equal
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-18 15:13:38 +02:00
Neeraj Singh
6caf943ace primary_keys_test reads better than pk_test
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-18 15:13:29 +02:00
Neeraj Singh
b58e1c52f7 fixing typo
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-18 15:13:21 +02:00
Neeraj Singh
df6aa8e246 removing extra whitespaces
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-18 15:13:14 +02:00
Subba Rao Pasupuleti
4a0d7c1a43 save on parent should not cascade to child unless child changed [#3353 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-18 11:31:29 +02:00
José Valim
e210895ba9 Avoid uneeded queries in session stores if sid is not given. 2010-07-18 11:02:08 +02:00
José Valim
fa98eca75b Add console hook to force ActiveRecord::Base to be loaded when console starts avoiding reference loops. 2010-07-18 11:02:07 +02:00
Aaron Patterson
42be67e8d4 unfactoring clear_stale_cached_connections! 2010-07-16 14:48:50 -07:00
Aaron Patterson
8d17f53318 adding a test for clearing stale connections 2010-07-16 14:39:40 -07:00
Aaron Patterson
7ba54ff711 fixing test file name 2010-07-16 13:54:14 -07:00
Aaron Patterson
2244bb0013 fixing whitespace errors 2010-07-16 13:50:58 -07:00
Aaron Patterson
04ef434b21 only test for existence of +pool+ once 2010-07-16 11:44:29 -07:00
Aaron Patterson
b952470cc2 use an attr_reader for performance 2010-07-16 11:44:29 -07:00
Santiago Pastorino
79d9e0f155 Makes this test don't trust on the speed of execution 2010-07-17 02:39:26 +08:00
Aaron Patterson
1b2824b659 fixing typeo. thanks bamnet! 2010-07-16 09:13:51 -07:00
Neeraj Singh
1f2a5199cb moving persistence related tests to a new file
Before refactoring test result from AR:
2291 tests, 7180 assertions, 0 failures, 0 errors

After the refactoring test result from AR:
2291 tests, 7180 assertions, 0 failures, 0 errors

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-16 17:26:06 +02:00
Pratik Naik
130bf3c9ed Fix data loading from the performance script 2010-07-16 08:28:49 +01:00
David Genord II
1fcf4e8ecb JoinDependency#graft does not properly set parent join [#5124 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2010-07-16 08:28:49 +01:00
Santiago Pastorino
fcb230144b Bump up nokogiri, memcache-client, sqlite3-ruby, fcgi, mail and tzinfo 2010-07-15 13:18:47 -07:00
Pratik Naik
0c2c893434 Revert "Style fixes"
This reverts commit 3c300b3121.
2010-07-15 13:17:35 +01:00
Aaron Patterson
62dd1d8d23 clean up ||= with an initialized variable and attr_reader 2010-07-14 17:53:20 -07:00
wycats
3c300b3121 Style fixes 2010-07-14 17:33:07 -07:00
Aaron Patterson
955b26ac6e primary_key_name already checks for the model_class 2010-07-14 17:11:52 -07:00
Aaron Patterson
d41a28bcca use array intersection for dry / faster code 2010-07-14 17:09:14 -07:00
Aaron Patterson
1db8ed0f4b activerecord tests should inherit from ActiveRecord::TestCase 2010-07-14 16:35:52 -07:00
Aaron Patterson
6a534455f6 remove useless ternary in PostgreSQL adapter 2010-07-14 15:44:15 -07:00
Aaron Patterson
8ba14c238e PostgreSQLAdapter#query string interpolation calls to_s for us 2010-07-14 15:18:48 -07:00
Aaron Patterson
51c9b666e6 PostgreSQLAdapter#query bail early if there is no column and dry up our conditionals 2010-07-14 15:10:45 -07:00
Aaron Patterson
36150c902b Let's initialize instance variables in the postgres adapter. 2010-07-14 15:04:14 -07:00
Pratik Naik
d5921cdb7a Remove unintentional API changes. [#1108] 2010-07-14 18:32:28 +01:00
Pratik Naik
4a06489525 Style fixes 2010-07-14 16:50:26 +01:00
Xavier Noria
b7944e1b21 revises the rdoc of update_attributes and update_attributes! to document they are wrapped in a transaction, and adds code comments explaining why 2010-07-14 17:42:57 +02:00
Jacob Lewallen
d10ecfefb8 Set destroyed=true in opt locking's destroy [#5058 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-14 08:02:17 +02:00
Neeraj Singh
edb5401039 count method should not take options if it is operated on has_many association which has finder_sql or counter_sql
[#2395 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-13 22:03:35 +02:00
Neeraj Singh
f4fbc2c1f9 update_attributes and update_attributes! are now wrapped in a transaction
[#922 state:resovled]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-13 22:02:00 +02:00
Aaron Patterson
e35e6171bb reducing range comparisons when converting types to sql 2010-07-13 11:56:00 -07:00
Aaron Patterson
35e304193b only loop through all rows and columns once in the postgres adapter 2010-07-13 10:57:22 -07:00
Aaron Patterson
bc35631dc7 use constants instead of magic numbers. meow 2010-07-13 10:57:22 -07:00
Xavier Noria
6d2e4ee96c Merge remote branch 'docrails/master' 2010-07-13 18:41:09 +02:00
Benjamin Quorning
7e075e6247 Fixed many references to the old config/environment.rb and Rails::Initializer 2010-07-13 13:00:21 +02:00
Vitalii Khustochka
b75fca9e57 Added reorder delegation for ActiveRecord::Base(to be able to overwrite the default_scope ordering in the named scope [#5093 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-13 08:31:55 +02:00
Will St. Clair + Neeraj Singh
b520d602ff string IDs are now quoted correctly [#5064 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-13 08:14:52 +02:00
Subba Rao Pasupuleti
44e7fba59e renaming test name to fix accidently override
[#5076 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-13 08:09:57 +02:00
Mislav Marohnić
571cb1ddc6 enable AS::JSON.encode to encode AR::Relation by providing as_json method
[#5073 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-13 08:09:28 +02:00
José Valim
3401311562 Tidying up a bit, so update_attribute is not called twice on touch. 2010-07-13 08:05:09 +02:00
Neeraj Singh
1d45ea0814 with this fix touch method - does not call validations - doest not call callbacks - updates updated_at/on along with attribute if attribute is provided - marks udpated_at/on and attribute as NOT changed
[#2520 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-07-13 07:03:42 +02:00
Aaron Patterson
2aed63eb52 our method is modifying the original array, so refactor to use destructive methods 2010-07-12 17:58:48 -07:00