Jon Leighton
22bcb4e093
CommandRecorder should delegate in method_missing where possible. Fixes some tests in migration_test.rb under mysql. The problem was introduced in c278a2c5e1.
2011-06-30 00:48:03 +01:00
Jon Leighton
b09ef6d139
Define to_ary on ActiveRecord::Base to return nil. Improve performance of Array#flatten under 1.9, see comment for details.
2011-06-30 00:20:38 +01:00
Santiago Pastorino
4cee36044b
Merge pull request #1885 from guilleiguaran/3-1-stable
...
Bump ARel to 2.1.3 (3-1-stable)
2011-06-28 14:59:10 -07:00
Guillermo Iguaran
4b12d7f369
Bump ARel to 2.1.3
2011-06-28 16:04:30 -05:00
Raimonds Simanovskis
cbf3e33176
Fix test_finding_with_cross_table_order_and_limit for Oracle
...
Use latest Arel syntax and pass each order by expression as separate argument to order method as otherwise invalid Oracle SQL is generated.
2011-06-28 13:49:35 -07:00
Ernie Miller
c26c273761
Support reversal of ARel orderings in reverse_sql_order
2011-06-28 13:12:58 -07:00
Vijay Dev
eb3e523434
record unsupported methods in CommandRecorder instead of letting the unsupported methods go through to the underlying db causing errors like duplicate columns to occur when rolling back migrations
2011-06-28 12:05:52 -07:00
Damien Mathieu
f170045c59
comparing different classes returns nil
2011-06-28 11:47:37 -07:00
Damien Mathieu
c5b43afd6c
allow comparison on model objects - Closes #1858
2011-06-28 11:47:32 -07:00
Aaron Patterson
e0fae7265f
remove useless assignment
2011-06-28 10:58:08 -07:00
Aaron Patterson
d8646163e5
lock_optimistically is typically true, so evaluate the common failure case first
2011-06-28 10:51:32 -07:00
Aaron Patterson
558b5bb490
reduce object allocation during AR instantiation
2011-06-28 10:22:47 -07:00
Aaron Patterson
196f92f366
remove the check for needs_type_condition? because ensure_proper_type will pick up the type column
2011-06-27 20:44:49 -07:00
Aaron Patterson
992b3b5e06
stop using && for the short circuit side effect
2011-06-27 18:16:16 -07:00
Aaron Patterson
5d954b4e38
let strings be converted to symbols inside the interpreter
2011-06-27 18:16:12 -07:00
Aaron Patterson
9fd0d91b26
avoice paying hash cost if there are no serialized attributes
2011-06-27 17:47:13 -07:00
Aaron Patterson
2fe088a53d
cache column defaults for AR object instantiation
2011-06-27 17:47:09 -07:00
Aaron Patterson
b927f0a894
AR object instantiation is ~30% faster in the simple case
2011-06-27 16:15:44 -07:00
Aaron Patterson
0de56aac7f
initialize instance variables
2011-06-27 14:47:32 -07:00
Aaron Patterson
3a14e6fdd5
oops! remove debugging codes
2011-06-27 14:47:27 -07:00
Aaron Patterson
0abb7b8c39
default create_with_value to a hash so we can eliminate conditionals, add test surrounding create_with(nil) behavior
2011-06-27 14:19:22 -07:00
José Valim
0f128b1f67
Skip if it is actually a pluralize scheme.
2011-06-27 11:27:39 -07:00
Lucia Escanellas
975ff5debb
Improve ordering of multiple columns on postgresql
...
* Only on postgresql, order("first asc, second asc") was invalid
* Closes #1720
2011-06-24 17:48:22 -03:00
Jon Leighton
03580e0fa3
Apply the default scope earlier when doing calculations. Fixes #1682 .
2011-06-23 19:58:15 +01:00
Ken Collins
e5cf2add10
Update SQL Server db related rake tasks.
...
* Uses open source smoscript since scptxfr came out in 2000.
* Uses sqlcmd which replaces osql.
* Takes advantage of host/user/pass passed down by TinyTDS.
2011-06-20 22:08:31 -04:00
Daniel Azuma
f542188e7a
Add missing require 'set'
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2011-06-20 08:53:39 -03:00
Steve Hodgkiss
aba7a43273
Fix inconsistencies by being polite to the wrapped body. Needed for Rack::Sendfile to function properly. See issue #1761 .
2011-06-19 06:05:13 +01:00
Lucia Escanellas
a7813a64a6
Update remove_index documentation
...
* Changes should better reflect present code behavior
* Related to issue: https://github.com/rails/rails/issues/1624
2011-06-18 11:42:06 +02:00
Brian Lopez
89adadd39a
bump mysql2 to 0.3.6
2011-06-17 09:32:43 -07:00
Jon Leighton
b2efd2a75a
Add require 'pathname' as it has not already been required in some circumstances
2011-06-17 14:55:52 +01:00
Ken Collins
f960cb2832
Allow the connection pool's #table_exists? method to give the connections #table_exists? method a chance.
2011-06-17 09:05:13 +02:00
Jon Leighton
1cc0c3f52c
Perf fix - Use an instance variable instead of a class_attribute. Thanks @josevalim and @jhawthorn for the prompting.
2011-06-16 21:16:54 +01:00
Arun Agrawal
bf588c69de
Mysql bump
2011-06-16 10:48:28 +05:30
Brian Lopez
d2b13403ff
bump mysql2 version
2011-06-15 20:17:35 -07:00
Brian Lopez
7b04e5051e
on second thought, lets keep casting on by default. it can be disabled in database.yml by setting 'cast: false'
2011-06-15 20:03:12 -07:00
Brian Lopez
aeb7beb3c6
mysql2 casting changes require mysql2 >= 0.3.3
2011-06-14 15:42:08 -07:00
Brian Lopez
e56567c0b2
Turn off eager casting for mysql2, so ActiveRecord can lazily cast values later. This should help performance for tables with complex types like DATETIME, TIMESTAMP
2011-06-14 15:17:01 -07:00
Andrew White
45509ee6b7
Pass mass-assignment options to nested models - closes #1673 .
2011-06-13 13:07:44 +01:00
Andrew White
113466cd94
Rename tests to reflect associations
2011-06-13 10:02:24 +01:00
thoefer
1863f12713
Make sure to have a Hash under the i18n keys 'activerecord.attributes' and 'activerecord.models' as this might not always be the case. See issue #1662 .
2011-06-12 21:28:38 +02:00
Jon Leighton
fb1fd61634
Add support for using an ARCONFIG environment variable to specify the location of the config.yml file for running the tests
2011-06-12 19:13:25 +01:00
Jon Leighton
df63c99f06
Replace inline lambdas with named methods
2011-06-12 18:31:42 +01:00
Jon Leighton
bdd549a1c0
Refactor tests to be less brittle
2011-06-12 18:31:26 +01:00
Jon Leighton
5f43a2a2b1
Move BEGIN and COMMIT into IGNORED_SQL rather than having them as a special case in assert_queries
2011-06-12 18:31:20 +01:00
benedikt
b17fd25a2d
Don't wrap operations on collection associations in transactions when they are not needed, so the connection adapter does not send empty BEGIN COMMIT transactions blocks to the database.
2011-06-12 18:26:29 +01:00
José Valim
c19bd4f88e
Add a deprecation for nested i18n namespace lookup.
2011-06-11 17:58:07 +02:00
Brian Quinn
2d4d7ccf33
Ensure engine migrations are copied in the same sequence that they are required.
2011-06-10 12:59:41 +01:00
Aaron Patterson
279781f896
bumping to 3.1.0.rc4
2011-06-09 15:53:49 -07:00
Damien Mathieu
dc73c2c38f
don't reinitialize the arel_table unless the table_name changes
2011-06-09 14:40:26 -07:00
Aaron Patterson
aefd703443
bumping to 3.1.0.rc3
2011-06-08 14:34:20 -07:00