10265 Commits

Author SHA1 Message Date
Pratik Naik
9783e66cad Slightly faster DateTime#to_json. [#598 state:resolved] [Alex Zepeda] 2008-07-14 01:02:07 +01:00
rsl
95812d5eaf Ensure :index works with fields_for select methods. [#518 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-14 00:55:57 +01:00
Tapajós
0d241f4434 Use full path in database tasks so commands will work outside of Rails root [#612 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-07-13 14:19:03 -05:00
Joshua Peek
68fe898189 Check first render format and extension. Fixes failing ActionMailer test. 2008-07-13 14:05:21 -05:00
Joshua Peek
26bc867151 Small tweak to e0fef66 2008-07-13 14:00:40 -05:00
Joshua Peek
e0fef66149 Made ActionView::Base#first_render a little more private. And added _last_render to track the most recent render. Will fix #609 as a side effect. [#609 state:resolved] 2008-07-13 13:26:48 -05:00
Joshua Peek
99cc85bc09 Set config.action_view.warn_cache_misses = true to receive a warning if you perform an action that results in an expensive disk operation that could be cached 2008-07-12 15:31:50 -05:00
Joshua Peek
73b34e9f75 Refactor template preloading. New abstractions include Renderable mixins and a refactored Template class. 2008-07-12 14:33:46 -05:00
Joshua Peek
30204c4e66 Set global ActionController::Base.view_paths for test cases 2008-07-12 14:11:51 -05:00
Joshua Peek
65fb2e76f2 Removed a few implementation specific view path tests 2008-07-12 12:17:10 -05:00
Joshua Peek
b603de0882 Improve test coverage and create fixtures for RenderPartialWithRecordIdentificationTests 2008-07-12 12:17:10 -05:00
Daniel Guettler
f90eb81c65 Ensure script/generate finds generators from symlinked plugins. [#449 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-12 17:51:48 +01:00
Michael Koziarski
e53f5fe696 Restore support for partial matches in assert_redirected_to
If both the actual redirection and the asserted redirection are hashes, succeed if the asserted redirection is a strict subset of the actual redirection.
2008-07-12 11:42:41 +02:00
Johan Sørensen
50b5c6845e Ensure mail_to label is obfuscated for javascript encoding. [#294 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-12 01:04:18 +01:00
Micah Wedemeyer
5e2e1ed9ff Ensure MysqlAdapter allows SSL connection when only sslca is supplied. [#253 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-11 23:52:41 +01:00
Joshua Peek
6ebdd0e32b Changed ActionView::TemplateHandler#render API method signature to render(template, local_assigns = {}) 2008-07-11 15:40:41 -05:00
Michael Koziarski
292501c7e0 Use require_dependency 'application' not require in the console bootstraps to avoid requiring application.rb twice 2008-07-11 22:27:36 +02:00
Michael Koziarski
6b9f8adb3e Whitespace 2008-07-11 19:23:21 +02:00
Joshua Peek
c00baf496e Added tests to show that 2d372d7 breaks old generator behavior (#545 state:resolved) 2008-07-11 12:09:25 -05:00
Joshua Peek
f522a89d64 Revert "Fixed generator collisions for nested controller modules."
This reverts commit 2d372d7049.
2008-07-11 12:05:02 -05:00
Joshua Peek
04a87af5b7 Ensure use_accept_header is enabled for test_action_cache_conditional_options 2008-07-11 11:51:35 -05:00
Joshua Peek
d106f2d08a Ensure use_accept_header is enabled for test_action_cache_conditional_options 2008-07-11 11:49:22 -05:00
Joshua Peek
15b2175426 Fixed teardown method typo (plus whitespace) 2008-07-11 11:44:24 -05:00
Joshua Peek
68289693f7 Check for response in builder template since ActionMailer does not have one 2008-07-11 11:14:59 -05:00
Joshua Peek
7d5c447d9c Stubba is included in Mocha already 2008-07-11 11:12:53 -05:00
Clemens Kofler
feb08984ea Added notes to Routing documentation and routes.rb regarding defaults routes opening the whole application for GET requests
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-07-10 09:29:27 +02:00
Jeremy Kemper
d37e641336 Move accept header parsing shortcut to Mime::Type.parse 2008-07-09 11:30:18 -07:00
Jeremy Kemper
0ce7fe5308 Don't repeatedly convert only/except options 2008-07-09 10:42:30 -07:00
Cheah Chu Yeow
ce4a1bb853 Remove some Symbol#to_proc usage in runtime code. [#484 state:resolved] 2008-07-09 10:42:30 -07:00
Jeremy Kemper
11252e35b1 Boolean type casting creates fewer objects 2008-07-09 10:42:30 -07:00
Jeremy Kemper
f82bd31cb0 Request#accepts special-cases a single mime type 2008-07-09 10:42:30 -07:00
Jeremy Kemper
a6d0ae28e3 Fix teardown method name typo 2008-07-09 10:42:30 -07:00
Jeremy Kemper
ee6bbcb6ae Put a newline rather than a semicolon at the end of RJS source to avoid parse errors with embedded heredocs 2008-07-09 10:42:29 -07:00
Jeremy Kemper
7dc10478e5 Use ActionController::Base.logger to report template compilation errors since there is no AV::Base.logger 2008-07-09 10:42:29 -07:00
Jeremy Kemper
4354aa36fb Rendering default template for missing actions works with non-word characters in action name 2008-07-09 10:42:29 -07:00
Jeremy Kemper
350faf14e8 Pass caller to concat deprecation warning 2008-07-09 10:42:29 -07:00
Michael Koziarski
4ce9931f4f Reenable the use of the Accept header to give people a chance to update their applications and provide feedback. 2008-07-09 18:36:15 +02:00
David Heinemeier Hansson
6b61e95dc8 Changed PrototypeHelper#submit_to_remote to PrototypeHelper#button_to_remote to stay consistent with link_to_remote (submit_to_remote still works as an alias) (clemens) [#8994 status:closed] 2008-07-09 09:13:24 -05:00
Daniel Guettler
84af99e78d Ensure NamedScope#build/create/create!/new works as expected when named scope has hash conditions. [Daniel Guettler, Pratik Naik] [#419 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-09 14:09:17 +01:00
Chris Cherry
124d1016fa Allow Infinity (1.0/0.0) to pass validates_numericality_of. [#354 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-09 13:15:07 +01:00
Cheah Chu Yeow
96708af6a5 Ensure url_for(nil) falls back to url_for({}). [#472 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-09 13:02:14 +01:00
Hongli Lai (Phusion
2b4eb586ef Plugin locator: sort directory listing because we can't assume that the OS will do it for us. This fixes some unit test failures. 2008-07-09 13:34:36 +02:00
Luca Guidi
dc77359c16 Removed unnecessary or condition in #error_messages_for 2008-07-08 17:41:18 +02:00
Damian Janowski
91320f2a80 Add :recursive option to javascript_include_tag and stylesheet_link_tag to be used along with :all. [#480 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-08 13:50:59 +01:00
Luca Guidi
cf5d6ab9a8 Added localize helper method 2008-07-08 12:37:49 +02:00
Luca Guidi
2949918b4c Make sure object name is translated in #error_messages_for 2008-07-08 11:53:19 +02:00
rick
a14cedc779 Merge branch 'master' of git@github.com:rails/rails 2008-07-07 22:24:18 -07:00
Luca Guidi
826c3db421 Updated ActiveRecord::Errors#default_error_messages deprecation warning according to i18n changes 2008-07-07 22:46:16 +02:00
Michael Koziarski
2f4aaed7b3 Disable the Accept header by default
The accept header is poorly implemented by browsers and causes strange errors when used on public sites where crawlers make requests too.  You should use formatted urls (e.g. /people/1.xml) to support API clients. Alternatively to re-enable it you need to set:

config.action_controller.use_accept_header = true

A special case remains for ajax requests which will have a javascript format for the base resource (/people/1) if the X-Requested-With header is present.  This lets ajax pages still use format.js despite there being no params[:format]
2008-07-07 07:31:49 +02:00
rick
e939f60b6c Merge branch 'assert_redirected_to_fix' 2008-07-06 13:58:07 -07:00