Eloy Duran
9550916903
Raise a RecordNotFound if an ID in nested attributes is given but doesn't return a record. [ #2415 state:resolved]
2010-01-07 13:19:49 +01:00
Eloy Duran
b6264c43f4
Moved the validation logic to the association reflection and refactored autosave_association.rb a bit.
2010-01-07 13:19:48 +01:00
Eloy Duran
fc6aae3459
Remove deprecated '_delete' option from NestedAttributes.
2010-01-07 13:19:48 +01:00
Eloy Duran
a559260e41
Removed unnecessary call to #try and cleaned up a bit more.
2010-01-07 13:19:48 +01:00
Eloy Duran
f866ced24a
Don't use strings for callbacks, as these will be evaled. Rather use symbols, which uses a direct method dispatch.
...
Patch by Comron Sattari. [#3429 state:resolved]
2010-01-07 13:19:48 +01:00
Eloy Duran
2171e0a1d1
Cleanup some code in nested_attributes.rb, autosave_association.rb, and associations.rb with AssociationReflection#collection_association?
...
Also cache the result value.
2010-01-07 13:19:48 +01:00
Eloy Duran
f82adc7c5a
Add AssociationReflection#collection_association? which returns true if it's for a has_many or has_and_belongs_to_many association.
2010-01-07 13:19:48 +01:00
Eloy Duran
1afa9fa5a9
Refactored nested attributes a bit around :reject_if => :all_blank.
2010-01-07 13:19:48 +01:00
Jeremy Kemper
a323b83acf
Remove unneeded reliance on super -> method_missing quirk
2010-01-07 00:06:20 -08:00
Jeremy Kemper
816ba1e15a
Remove unneeded reliance on Numeric#round quirk
2010-01-06 23:35:03 -08:00
José Valim
74f6ccea20
instrumenter should be accessible from ActiveSupport::Notifications.
2010-01-06 22:24:16 +01:00
José Valim
0c2d933f36
Ensure before_validation and after_validation accepts :on as option.
2010-01-06 22:24:16 +01:00
Jeffrey Hardy
cfe0fcae06
Fix failing app generator test when using the --dev option
2010-01-06 14:22:51 -05:00
Jeffrey Hardy
caad6c634c
Restore require of 'active_record/fixtures' for Rake tasks that use them
2010-01-06 13:58:27 -05:00
Jeffrey Hardy
894ce15534
Use better defaults for fixtures: transactional=true, instantiated=false
...
These reflect the settings that were previously included in the default
test_helper.rb, removed in d7d9173.
2010-01-06 13:38:11 -05:00
Jeffrey Hardy
891ba18d65
Update db:migrate error message to reflect the removal of config.frameworks
2010-01-06 13:37:45 -05:00
Jeffrey Hardy
8a41b710f6
Fix spacing on frameworks error message
2010-01-06 13:37:11 -05:00
Joshua Peek
88fd569ba0
Remove config.gem deprecation stub since its not "deprecated" but
...
completely removed.
This makes feature detection easier with config.respond_to?(:gem)
2010-01-06 11:33:04 -06:00
José Valim
0d5ce7c525
namespace in routes changes both the path and name prefix.
2010-01-06 09:51:46 +01:00
José Valim
e4099c2ad3
Allow named routes to be debugged.
2010-01-06 09:32:29 +01:00
Joshua Peek
bbe80ae652
config.plugins should still work with an array of strings
2010-01-05 23:37:40 -06:00
José Valim
10389a4c29
Ruby 1.9.1 requires hash given to foormat to contain symbols.
2010-01-06 00:42:58 +01:00
José Valim
0cf190001e
Remove CGI.escape in function of Rack::Mount.escape
2010-01-06 00:33:17 +01:00
José Valim
e55d70a380
redirect in routes takes port into account [ #3653 status:resolved]
2010-01-05 23:40:56 +01:00
Joshua Peek
b3900a29eb
All router redirect helper to accept a full URI [ #3653 state:resolved]
2010-01-05 12:00:38 -06:00
Joshua Peek
8ff4faf66a
assert_template depends on AV::Template monkey patches in action_view/test_case
2010-01-05 11:48:06 -06:00
David Heinemeier Hansson
2dc5aeed6d
NumberHelper#number_to_currency should output html_safe strings so the units are not escaped
2010-01-05 08:22:17 -08:00
Dan Croak
38f669766c
Rails layouts, error pages, and public/index now use HTML5.
...
The specification allows the character encoding meta tag to be removed
if character encoding is set at the transport level (Content-Type),
which Rails is doing.
http://dev.w3.org/html5/html4-differences/#character-encoding
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2010-01-05 10:13:29 -06:00
Jeremy Kemper
5c527c2f61
Controller tests should always require view tests since they add behavior controllers expect
2010-01-04 19:44:27 -08:00
Joshua Peek
3f28e0bda6
Trash string coercion rack hacks
2010-01-04 19:46:21 -06:00
Joshua Peek
76b5f18feb
Default middleware stack needs to be available at configuration time
2010-01-04 19:40:16 -06:00
Joshua Peek
56b28ec8d6
Middleware configuration tests
2010-01-04 19:40:16 -06:00
Jeremy Kemper
6591a10b1f
Reinstate explicit active_support/test_case require since console_app interacts with a non-autoloaded constant
2010-01-04 17:00:47 -08:00
Carlhuda
952e449fc0
Fix --dev option
2010-01-04 16:32:43 -08:00
Joshua Peek
17f053931e
use_instantiated_fixtures and use_transactional_fixtures defaults are set in active_record/fixtures
2010-01-04 17:23:36 -06:00
Joshua Peek
947bbc170e
Smoke test for test_help
2010-01-04 17:13:45 -06:00
Joshua Peek
508ffccfe7
rack and rack-test are pulled in by AD
2010-01-04 16:55:27 -06:00
Joshua Peek
e5ed62deea
Autoload AR test case
2010-01-04 16:50:01 -06:00
Joshua Peek
640d9e7e32
Autoload AMo test case
2010-01-04 16:29:07 -06:00
Joshua Peek
2601a16ede
Autoload AS test case
2010-01-04 16:22:46 -06:00
Joshua Peek
ce56c36cd3
Autoload AM test case class
2010-01-04 16:22:46 -06:00
Joshua Peek
cf83a6f16b
Autoload AC and AV test case classes
2010-01-04 16:22:46 -06:00
José Valim
45462c5e41
Expose Instrumenter id in Notifications.
2010-01-04 23:05:28 +01:00
José Valim
562a00ba16
@_formats initialization should be AbstractController::Base.
2010-01-04 23:05:28 +01:00
José Valim
bd729344a7
Remove deprecated formatted named routes
2010-01-04 23:05:27 +01:00
Zach Brock
79438b4638
adding fix for auto linking to master too
...
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2010-01-05 10:57:20 +13:00
Joshua Peek
ae270f597d
Remove rack submodule, 1.1 has been released as a gem.
2010-01-04 10:09:10 -06:00
David Heinemeier Hansson
5e94d3e3ea
Merge
2010-01-03 22:27:28 -08:00
David Heinemeier Hansson
d7d917335e
Stop featuring ActiveSupport::TestCase.use_instantiated_fixtures and ActiveSupport::TestCase.use_transactional_fixtures as likely-to-change settings in test/test_helper.rb -- they are not and their values are already set in test_help.rb [DHH]
2010-01-03 19:55:21 -08:00
David Heinemeier Hansson
437df4a8d3
Describe intent, not implementation
2010-01-03 19:46:10 -08:00