Jeremy Kemper
9da7ff8842
Bump 2-3-stable to 2.3.9
2010-05-25 09:50:34 -07:00
Santiago Pastorino
240f4e944c
SQLite: forward compatibility with future driver releases
...
[#4633 ]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-24 20:53:26 -07:00
Jeremy Kemper
4fef5af9c3
2.3.7.pre1: fixes HTML escaping when *not* using rails_xss
2010-05-24 14:02:38 -07:00
Jeremy Kemper
f97da34b4f
Bump 2-3-stable to 2.3.8
2010-05-24 01:39:19 -07:00
Jeremy Kemper
326188c25e
2.3.7 release: fix rails_xss compatibility
2010-05-24 00:04:41 -07:00
Jeremy Kemper
55e88eeee4
Bump 2-3-stable to 2.3.7
2010-05-23 01:39:45 -07:00
Jeremy Kemper
56bb5504dd
2.3.6 release
2010-05-22 23:53:40 -07:00
Aaron Patterson
a637b5f447
backporting beda2d43 for newer sqlite-ruby bindings
...
Signed-off-by: Xavier Noria <fxn@hashref.com >
2010-05-22 20:52:15 +02:00
Jeremy Kemper
9d99e610be
Revert "Don't carry default value when changing column for a binary type on MySQL"
...
Broke mysql tests.
This reverts commit ddadcc7cf8 .
Conflicts:
activerecord/test/cases/migration_test.rb
[#3234 state:open]
2010-05-18 11:03:59 -07:00
Étienne Barrié
99bcce7ec1
make add_index and remove_index more resilient; new rename_index method; track database limits
...
[#3452 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-18 10:51:36 -07:00
Ian White
a5696e36c6
Nested records (re: autosave) are now updated even when the intermediate parent record is unchanged [ #4242 ]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-18 16:10:44 +02:00
Xavier Noria
bb2327d9ab
method rename to fix a broken test
2010-05-18 00:31:41 +02:00
Rizwan Reza
32b0b5f7b2
Deprecate Array#rand in favor of Array#random_element [ #4555 stated:committed]
...
Signed-off-by: Xavier Noria <fxn@hashref.com >
2010-05-17 23:56:44 +02:00
José Valim
76608b13d2
superclass_delegating_accessor does not accept options.
2010-05-17 12:37:42 +02:00
Wijnand Wiersma
5b1f4c51ce
Postgresql doesn't allow to change a string type column to a binary type. Skip this test for postgresql for now.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-16 15:15:16 +02:00
Nobuhiro IMAI
e535b45c86
make fixture accessors private
...
prevent to be run fixture accessor (e.g. test_foos for TestFoo model) as a test case
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-16 10:35:23 +02:00
Elomar França
ddadcc7cf8
Don't carry default value when changing column for a binary type on MySQL [ #3234 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-16 10:30:47 +02:00
Lawrence Pit
0706bdce60
docs + test for each_error
...
[#3185 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-15 11:49:04 -07:00
Josh Kalderimis
8e7a64d090
backported AR correction to find_each and find_in_batches to raise when the user uses select but does not specify the primary key
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-15 09:51:58 +02:00
José Valim
6949d6f54f
Remove deprecated tests according to 8e679f1
2010-05-14 23:43:21 +02:00
Pratik Naik
7cbc546d39
Use superclass_delegating_accessor for connection handlers
2010-05-12 17:43:02 +01:00
Jeremy Kemper
9ab1154523
Drop require removed by 8e679f1
2010-05-11 22:39:53 -07:00
Santiago Pastorino
ad73a3aec4
type_cast_calculated_value refactor: value is never a Fixnum here. Fix test since SQLite returns Float.
...
[#4514 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-11 22:28:36 -07:00
José Valim
8e679f1854
Remove i18n interpolation deprecation. It has been around since 2.2.
2010-05-11 22:13:03 +02:00
Pratik Naik
3c1bb40b6b
Make sure schema dumper doesnt throw up when there are no index lengths
2010-05-09 12:42:15 +01:00
Pratik Naik
77adb4bc20
Revert "Revert "Add index length support for MySQL [ #1852 state:resolved]" (breaks the build)"
...
This reverts commit eababa35cf .
2010-05-09 12:34:07 +01:00
Carl Lerche
eababa35cf
Revert "Add index length support for MySQL [ #1852 state:resolved]" (breaks the build)
...
This reverts commit 3616141fa2 .
2010-05-08 23:56:06 +03:00
Santiago Pastorino
555801c908
The intention here was to assign to different objects ht: Radar
2010-05-08 23:34:07 +03:00
Emili Parreno
3616141fa2
Add index length support for MySQL [ #1852 state:resolved]
...
Example:
add_index(:accounts, :name, :name => 'by_name', :length => 10)
=> CREATE INDEX by_name ON accounts(name(10))
add_index(:accounts, [:name, :surname], :name => 'by_name_surname', :length => {:name => 10, :surname => 15})
=> CREATE INDEX by_name_surname ON accounts(name(10), surname(15))
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2010-05-08 12:43:34 +01:00
Santiago Pastorino
f967b352d2
Make find_or_create and find_or_initialize work mixing explicit parameters and a hash. ht: Marc-André Lafortune
...
[#4457 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-07 13:29:51 -07:00
Pratik Naik
f194d65f36
Use primary key in conditions, not 'id' [ #4395 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
Conflicts:
activerecord/test/cases/nested_attributes_test.rb
2010-05-04 22:45:16 +01:00
Jatinder Singh
aeff1719ab
AR JSON Serializer now supports custom root option.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-04 13:18:27 -07:00
Brian Lopez
6dbc75fd76
Allow pre-casted values (other than nil) to pass through from calculations un-touched
...
[#4514 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-05-04 12:27:24 -07:00
Pratik Naik
04fa5af6a6
Use class_inheritable_accessor for connection_handler
2010-05-04 17:52:53 +01:00
Neeraj Singh
dcf0f97514
making rake:migrate VERSION=0 a noop called in succession. [ #2137 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-04-29 13:32:12 +02:00
Curtis Hawthorne
ce5af2fefe
Destroy respects optimistic locking.
...
Now works with :dependent => :destroy and includes unit tests for that
case. Also includes better error messages when updating/deleting stale
objects.
[#1966 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-04-27 21:52:22 -07:00
Jeremy Kemper
457a54653d
Remove quoted_string_prefix entirely since PostgreSQL was the only database adapter relying on it.
2010-04-24 16:27:34 -07:00
Jeremy Kemper
5c0ad82236
PostgreSQL: remove the unnecessary heuristic checking whether the value is escaped
2010-04-24 15:52:51 -07:00
Jeremy Kemper
c9e15709ae
PostgreSQL: use standard-conforming strings if possible
2010-04-24 15:36:31 -07:00
Eugene Pimenov
cec44f5838
PostgreSQL adapter: escape_bytea, quote_string and unescape_bytea aren't thread-safe in Ruby 1.8 [ #3237 state:resolved]
...
Signed-off-by: wycats <wycats@gmail.com >
2010-04-24 13:12:14 -07:00
Mislav Marohnić
8be3e09fcf
fix reset_counters to work even with complex class names
...
e.g. it guesses that a belongs_to association to Namespace::MyModel is
named "my_model", unlike before where it would look up an association
named "namespace::mymodel" and fail.
2010-04-17 03:13:13 +02:00
Mislav Marohnić
ef0591efc2
cleanup update/reset_counters; refactor tests
2010-04-17 03:13:00 +02:00
Eugene Pimenov
18ba648e0d
Implement find_in_batches without with_scope [ #2227 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2010-04-15 01:13:16 +01:00
Pratik Naik
5efb1503dd
Ensure not to load the entire association when bulk updating existing records using nested attributes
2010-04-14 01:51:43 +01:00
Santiago Pastorino
958b0e977a
fix stack trace lines on class_eval
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-04-09 22:06:51 +02:00
Simon Effenberg
1d7368200f
remove_index now uses quote_table_name() [ #4300 state:resolved]
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2010-04-06 14:16:40 +12:00
Andrew White
e617af13a2
Backport of lazy evaluation of has_many ..., :dependent => :___
...
[#2627 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-04-04 07:01:38 -07:00
Pratik Naik
1f44fc90c6
Dont use Rails 3 finder syntax in Rails 2.3.x test [ #4303 state:resolved]
2010-03-31 14:14:56 +01:00
Pratik Naik
0e57c70baf
Dont try to load the record from the db if preloading didn't find anything
2010-03-31 12:57:06 +01:00
Joseph Wilk
ea6ef768a7
Fixed a bug where create_table could not be called without a block [ #2221 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2010-03-30 15:00:44 +13:00