Commit Graph

10813 Commits

Author SHA1 Message Date
Jeremy Kemper
98f96a0809 Ignore isolation test tests for test-unit 2 also 2009-09-13 05:52:18 -07:00
Jeremy Kemper
053a0f6ac4 Clean up spurious JSON decoding test failure 2009-09-13 05:43:02 -07:00
Jeremy Kemper
7d2add8c96 Ruby 1.9 compat: fix regexp slice test 2009-09-13 05:31:43 -07:00
Jeremy Kemper
cce2112f12 Silence warning for Encoding.default_external= 2009-09-13 04:48:40 -07:00
Jeremy Kemper
91ffddca57 Use Encoding.default_external, not _internal 2009-09-13 04:43:41 -07:00
sdsykes
dbe9fa03df Ruby 1.9 compat: corrected instance_methods check
[#3156 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-09-13 02:57:53 -07:00
Jeremy Kemper
091486fb98 activesupport -> active_support 2009-09-13 02:45:37 -07:00
Aaron Patterson
f959758687 making secure_compare faster
[#3195 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-09-13 02:44:52 -07:00
Michael Koziarski
e590508a9b Dup the arguments to string compare so we can use force_encoding. 2009-09-13 10:36:04 +12:00
Michael Koziarski
81cba78e9e Merge commit 'alloy/master-nested_attributes_and_autosave' 2009-09-13 10:32:24 +12:00
Yehuda Katz
76cd4cb27e Memoize in the endpoint. 2009-09-12 15:38:34 -05:00
Yehuda Katz
ddb4600ce6 Get ActionPack's test running on bundled gems. This should make running tests on new machines, as well as CI, work well. 2009-09-12 15:22:11 -05:00
Yehuda Katz
a8a336cbfc Revert "ruby 1.9 friendly secure_compare" because it breaks CI and Sam Ruby's suite
This reverts commit 5de75398c4.
2009-09-12 14:35:03 -05:00
Yehuda Katz
7152a4e9a6 Add per-controller middleware 2009-09-12 13:51:15 -05:00
Eloy Duran
26639e8a45 Removed the version of ActiveRecord::Base#destroyed? that was added in a44a1257d8.
Because José Valim was cheeky enough to already add it to the master branch.
2009-09-12 16:16:48 +02:00
Eloy Duran
a144b41cbc Removed some superfluous conditionals from the autosave association validation methods.
Which are unneeded now that we only define them when needed.
2009-09-12 16:04:47 +02:00
Alexey Kovyrin
938c0ee045 Define autosave association validation methods only when needed. [#3161 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
2009-09-12 16:04:36 +02:00
Eloy Duran
580ec0dccd Added some documentation about setting :autosave => false on an association. 2009-09-12 16:04:25 +02:00
Eloy Duran
65f98951ac During autosave, ignore records that already have been destroyed. [#2537 state:resolved] 2009-09-12 16:04:07 +02:00
Graeme Porteous
c01be9de32 Fix has_one with foreign_key and primary_key association bug which caused the associated object being lost when saving the owner. [#1756 state:resolved]
Mixed in a bit from patch by ransom-briggs. [#2813 state:resolved]

Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
2009-09-12 16:03:32 +02:00
José Valim
3091252aba Rename nested attributes _delete to _destroy to reflect its actual behavior and DSL (:allow_destroy). Deprecation warning added. [#2889 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
2009-09-12 15:59:32 +02:00
Dmitry Polushkin
845f62f473 Fix autosave association to skip validation if it is marked for destruction. [#2064 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
2009-09-12 15:56:01 +02:00
Eloy Duran
6cc0b9638f Explicitely setting `autosave => false' should override new_record autosaving. [#2214 state:resolved]
Original author is Jacob.
2009-09-12 15:53:15 +02:00
Andrew France
1b78e9bba3 Allow fields_for on a nested_attributes association to accept an explicit collection to be used. [#2648 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
2009-09-12 15:50:05 +02:00
Lance Ivy
a44a1257d8 Don't cascade autosave validation to destroyed children. [#2761 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
2009-09-12 15:40:45 +02:00
Mike Breen
bcd0ef710e Raise an exception with friendlier error message when attempting to build a polymorphic belongs_to with accepts_nested_attributes_for. [#2318 state:resolved]
Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
2009-09-12 15:37:54 +02:00
sdsykes
3180619c0d Fix habtm associations when using multiple databases
[#3128]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-09-12 02:57:29 -07:00
Jeremy Kemper
8682d76cc9 Revert "Allow frameworks to be required by their gem name"
This has just been confusing. Better to educate than band-aid.

This reverts commit 18a24274ec.
Originally from http://dev.rubyonrails.org/ticket/8845 [drnic]
2009-09-12 02:41:01 -07:00
Akira Matsuda
3ce16b4c5f Ruby 1.9 compat: Avoid using the return value of FileUtils.mkdir_p, as it does not return a String but an Array in Ruby 1.9
[#2018 state:committed milestone:2.3.5]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-09-11 19:20:57 -07:00
Akira Matsuda
0990a13500 Ensure validation errors to be ordered in declared order
[#2301 state:committed milestone:2.3.5]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-09-11 18:52:22 -07:00
Akira Matsuda
68b2b730e4 Fix default_error_messages back to the original message
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-09-11 18:34:12 -07:00
Jakub Kuźma
b22c951e7a ruby 1.9 friendly secure_compare
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2009-09-12 12:48:34 +12:00
Shugo Maeda
ff2eb2d808 Removed the copyright notice not to show it in the result of 'ri ActiveRecord'. 2009-09-11 15:33:20 -07:00
Joshua Peek
72721c6725 Add gem load paths after loading environment 2009-09-11 10:31:31 -05:00
Nathaniel Talbott
f024aabee3 Fix filtering parameters when there are Fixnum or other un-dupable values.
[#3184 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-09-10 18:53:50 -07:00
Beau Harrington
38d65b03d6 Remove redundant checks for valid character regexp in ActiveSupport::Multibyte#clean and #verify.
[#3181 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-09-10 17:36:54 -07:00
José Valim
af5b12c64c Fix callbacks on ActionPack.
Signed-off-by: Yehuda Katz <wycats@gmail.com>
2009-09-08 10:28:28 -07:00
José Valim
2ea1d684d9 Refactor new callbacks and AR implementation.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-09-08 10:26:39 -05:00
José Valim
4f37b97033 Changed ActiveRecord to use new callbacks and speed up observers by only notifying events that are actually being consumed.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2009-09-08 10:26:39 -05:00
Jeremy Kemper
aeab739bd5 Ruby 1.9: fix MessageVerifier#secure_compare 2009-09-08 14:05:33 +09:00
Joshua Peek
47aebacd51 Please 1.8.6 CI 2009-09-07 21:56:53 -05:00
Joshua Peek
b7c1fbc050 Start running AS isolated tests on CI 2009-09-07 21:13:25 -05:00
Joshua Peek
1a0f822037 Use draw/connect mapper api instead of directly using add_named_route 2009-09-06 23:21:04 -05:00
Joshua Peek
314e18aba2 Need to reset session for AR session tests after altering the route set 2009-09-06 23:09:47 -05:00
Joshua Peek
2ae84e04aa Add fake controllers for url rewriter tests 2009-09-06 23:02:55 -05:00
Joshua Peek
c531bd6665 Cleanup hacky routing with controller_path in url helper tests. This doesn't work in real life anyway. 2009-09-06 22:29:29 -05:00
Joshua Peek
ab8aac09d6 Need to reset session in internal integration tests after altering the route set 2009-09-06 22:01:58 -05:00
Joshua Peek
9f47f8d892 Fix isolated running of AddressesTest 2009-09-06 21:42:05 -05:00
Joshua Peek
1c02fc295d Fix isolated running of ActionPackAssertionTest 2009-09-06 21:19:29 -05:00
Joshua Peek
c3accd7ded Fix failing isolated routing test 2009-09-05 19:39:33 -05:00