Commit Graph

2489 Commits

Author SHA1 Message Date
Pratik Naik
1d002f6bcb Make RackRequest#request_method respect _method 2008-07-16 05:02:29 +01:00
Joshua Peek
83e29b9773 Removed config.action_view.cache_template_loading, use config.cache_classes instead 2008-07-15 22:58:42 -05:00
Pratik Naik
5cc3ea6969 RackResponse should not contain Status header 2008-07-16 04:17:28 +01:00
Pratik Naik
0f8206104e RackRequest#content_type should return Mime::Type 2008-07-16 03:18:35 +01:00
Jeremy Kemper
ecc0543525 JavaScriptGenerator should only sets output_buffer for the duration of the update block 2008-07-15 18:42:22 -07:00
Joshua Peek
aca246ab25 Get buffer for fragment cache from template's @output_buffer 2008-07-15 14:43:52 -05:00
Jeremy Kemper
3c282f3a0a Ruby 1.9 compat: only eval with block.binding in 1.9, uses more memory than eval with block 2008-07-15 10:42:50 -07:00
松田 明
bb33432b0f Ruby 1.9 compat: call Proc#binding explicitly. [#623 state:resolved] 2008-07-15 10:39:02 -07:00
Joshua Peek
001c8beb4d memorize typo 2008-07-14 20:02:59 -05:00
Joshua Peek
dd41f66af5 Include Memoizable in ActionView::Template 2008-07-14 19:51:43 -05:00
Tarmo Tänav
d27dd860c7 Use sub instead of gsub
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-07-14 18:02:59 -05:00
Joshua Peek
9dc258d614 Eager load Partial variable_name and counter_name. Tidy up render_partial_collection. 2008-07-14 17:40:58 -05:00
Jeremy Kemper
2d6562d51b Move dead recompile_template? also 2008-07-14 13:51:59 -07:00
Jeremy Kemper
3fbefecc9c Remove dead code from merge 2008-07-14 13:47:51 -07:00
Jeremy Kemper
4e323f6ef0 Fix bad merge 2008-07-14 11:50:07 -07:00
Jeremy Kemper
425de8db6a Use instance_method(...) to check whether the method exists 2008-07-14 10:46:15 -07:00
Jeremy Kemper
2167f95d85 Restore the more readable before_ and after_filters methods since they aren't called frequently 2008-07-14 10:11:53 -07: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
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
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
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
6b9f8adb3e Whitespace 2008-07-11 19:23:21 +02:00
Joshua Peek
68289693f7 Check for response in builder template since ActionMailer does not have one 2008-07-11 11:14:59 -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
f82bd31cb0 Request#accepts special-cases a single mime type 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
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
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
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
Joshua Peek
1d8623b42f Added local assign keys to compiled method name so two threads evaluating the same template with different locals don't step on top of each other 2008-07-06 01:13:15 -05:00
Joshua Peek
7b9e8ae273 Synchronize template compiling 2008-07-06 00:00:45 -05:00
Joshua Peek
9828aecd2a Lookup compiled methods in CompiledTemplates instance methods set instead of using a "methods_names" hash 2008-07-05 23:54:11 -05:00
Joshua Peek
ce5d958f8f Do not stat template files in production mode before rendering. You will no longer be able to modify templates in production mode without restarting the server 2008-07-05 18:35:52 -05:00
Joshua Peek
f22ae15a8e Use the inline template's hash as a method key instead of relying on a counter 2008-07-05 17:49:49 -05:00
Joshua Peek
5a3bc6f12f Removed unused template_args variable 2008-07-05 17:40:39 -05:00
Joshua Peek
27f382641c Deprecated TemplateHandler line offset 2008-07-05 17:31:57 -05:00
Joshua Peek
cd6fe83152 Ensure all complied method names are cleaned up in the error backtrace 2008-07-05 16:34:51 -05:00