Justin George
731d4392e4
Change event namespace ordering to most-significant first [ #4504 state:resolved]
...
More work still needs to be done on some of these names
(render_template.action_view and render_template!.action_view particularly)
but this allows (for example) /^sql/ to subscribe to all
the various ORMs without further modification
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-05-02 22:45:54 +02:00
Neeraj Singh
d793d30776
ActionCachingTestController rescues from all exceptions. Making sure that all the tests check for valid response. [ #4468 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-04-29 12:48:34 +02:00
José Valim
4163ccec23
Clean up the config object in ActionPack. Create config_accessor which just delegates to the config object, reducing the number of deprecations and add specific tests.
2010-04-22 12:00:13 +02:00
Santiago Pastorino and Carl Lerche
0ea434e2f4
Make perform_caching work again, with the tests passing and backward compatible
2010-04-15 18:25:08 -03:00
Santiago Pastorino
a618ad358a
Make use of config.perform_caching
2010-04-14 22:35:13 -07:00
Anil Wadghule
84e46437fa
Replace 'RAILS_ROOT' to 'Rails.root' and 'RAILS_ENV' to 'Rails.env' in significant places.
2010-04-12 22:53:49 +05:30
José Valim
4e92134dfa
Fix a bug in ActionDispatch::Static where Rails cannot find assets if started in another directory which is not the RAILS_ROOT.
2010-04-08 12:52:37 +02:00
wycats
f868c2afa9
response_body is an Array in 1.9, so an Array was being pushed onto the cache
2010-03-19 18:56:06 -07:00
Carlhuda
71c9337f45
All tests pass without memoizing view_context
2010-03-18 15:52:43 -07:00
Carlhuda
523d0f3700
Remove caching's dependency on view_context. Also, make it so that the layout is always rendered the same way (so that layout dependencies on the action actually being rendered aren't masked on the first render)
2010-03-18 14:55:29 -07:00
Carlhuda
3deb60e6b4
@layout is a confusing name... use @cache_layout
2010-03-18 14:55:29 -07:00
Carlhuda
c61ed70b00
Some more tweaks on <% %>.
...
* The cache helper is now semantically "mark this region for caching"
* As a result, <% x = cache do %> no longer works
2010-03-16 11:43:04 -07:00
Jeremy Kemper
748c78ffc8
RJS may cache an array
2010-03-15 23:48:32 -07:00
Carlhuda
9de83050d3
Add deprecation notices for <% %>.
...
* The approach is to compile <% %> into a method call that checks whether
the value returned from a block is a String. If it is, it concats to the buffer and
prints a deprecation warning.
* <%= %> uses exactly the same logic to compile the template, which first checks
to see whether it's compiling a block.
* This should have no impact on other uses of block in templates. For instance, in
<% [1,2,3].each do |i| %><%= i %><% end %>, the call to each returns an Array,
not a String, so the result is not concatenated
* In two cases (#capture and #cache), a String can be returned that should *never*
be concatenated. We have temporarily created a String subclass called NonConcattingString
which behaves (and is serialized) identically to String, but is not concatenated
by the code that handles deprecated <% %> block helpers. Once we remove support
for <% %> block helpers, we can remove NonConcattingString.
2010-03-15 14:50:43 -07:00
Jeremy Kemper
c937da9e2f
to_str works here
2010-03-15 11:18:45 -07:00
Jeremy Kemper
16572fd46e
read_ and write_fragment cache preserve html safety yet cache strings only
2010-03-14 19:09:32 -07:00
Jeremy Kemper
47bc138fc1
Write strings to fragment cache, not outputbuffers
2010-03-11 17:43:29 -08:00
Joshua Peek
dcd110c724
skip_relative_url_root url_for option is dead
2010-03-09 21:25:09 -06:00
Carlhuda
3438373f03
Use AS::Concern for caching modules
2010-03-04 16:59:54 -08:00
David Heinemeier Hansson
5ddc597066
Use safe_concat instead of trying to html_safe! what might be a frozen string
2010-01-10 18:13:43 -08:00
David Heinemeier Hansson
5ea130943e
Fixed that fragment caching should return a cache hit as html_safe (or it would all just get escaped) [DHH]
2010-01-07 17:45:32 -08:00
José Valim
3990310a2b
Use underscore in notification namespaces.
2010-01-04 00:03:56 +01:00
José Valim
6fbe9ef2ff
Use namespaces in notifications.
2010-01-03 20:39:42 +01:00
José Valim
75ba102a80
Remove ActionView inline logging to ActiveSupport::Notifications and create ActionController::Base#log_event, so everything can be logged within one listener. Also expose log_process_action as a hook for different modules to include their own information during the action processing. This allow ActiveRecord to hook and any other ORM. Finally, this commit changes 'Processing' and 'Rendering' in logs to 'Processed' and 'Rendered' because at the point it's logged, everying already happened.
2009-12-26 20:28:53 +01:00
Yehuda Katz
51c24ae3e3
Caching refactoring
2009-10-29 00:44:12 -04:00
Yehuda Katz
8dcf91ca11
First pass at cleaning up action caching
2009-10-28 16:54:00 -04:00
José Valim
2d7abe245e
Renamed Orchestra to Notifications once again [ #3321 state:resolved]
2009-10-15 18:51:51 -03:00
José Valim
af0d1fa892
Update Orchestra instrumentations and move part of logging to Orchestra.
2009-10-15 18:18:44 -03:00
José Valim
8b340ab2f6
Revert "Rename Orchestra to Notifications [ #3321 state:resolved]"
...
This reverts commit 8cbf825425 .
2009-10-15 18:06:15 -03:00
Joshua Peek
8cbf825425
Rename Orchestra to Notifications [ #3321 state:resolved]
2009-10-14 19:50:36 -05:00
José Valim
7cc1c2e71d
Add Orchestra instrumentation to fragment and page caching.
2009-09-20 10:56:38 -03:00
Yehuda Katz
efcfce50c4
Fixes "Cached fragment hit" written to log even if fragment is not cached (Erik Andrejko) [ #2917 state:resolved]
2009-08-08 12:46:44 -03:00
Yehuda Katz
af375a5eb3
Replace _action_view with view_context to reflect that it is public and that it does not need to be an ActionView instance
2009-08-06 19:45:40 -03:00
Yehuda Katz + Carl Lerche
55ee0ba7f5
Cleaning up if defined?(ActionController::Http) blocks from the pre new base era.
2009-06-17 16:23:11 -07:00
Yehuda Katz + Carl Lerche
8fdf3d7890
Remove some defined?(Http) checks
2009-06-17 16:14:05 -07:00
Yehuda Katz + Carl Lerche
f2f58f5355
Fix failing ActionCacheFilter tests due to around filter changes.
2009-05-27 17:31:48 -07:00
Pratik Naik
10085114ce
Make Filter#filter work with around filters
2009-05-25 18:09:12 +02:00
Yehuda Katz + Carl Lerche
67cc021d01
Modified caching implementation to work with NewBase
2009-05-19 18:11:45 -07:00
John F. Douthat
e59835bd09
Fix action-cached exception responses.
...
Methods raising ActiveRecord::RecordNotFound were returning 404 on first request and 200 OK with blank body on subsequent requests.
[#2533 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-04-30 16:43:01 -07:00
Joshua Peek
c0a372ba87
Deprecate template, session, assigns, and layout accessors on response object. Instead access them through the controller instance. This mainly affects functional test assertions.
2009-04-28 23:29:46 -05:00
lifo
5b92dcb675
Merge docrails
2009-04-17 14:28:46 +01:00
Mislav Marohnić
fa45540cdb
Ensure correct content type is declared after cache hits on actions with string cache keys [ #1585 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-03-10 23:31:19 +00:00
Tys von Gaza
dd02af5c7e
Fix for sweepers method_missing missing &block argument [ #1581 status:committed]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2009-01-27 16:11:45 -06:00
Joshua Peek
aa002c0e86
ActiveRecord::QueryCache middleware
2008-12-22 11:31:18 -06:00
Joshua Peek
3da1b94d07
Use status response accessor instead of the 'Status' header
2008-12-19 15:05:51 -06:00
Pratik Naik
dbbae5e00e
Merge with docrails
2008-12-07 03:27:53 +01:00
Joshua Peek
20d6fdd256
write_fragment returns content if caching is disabled [ #846 state:resolved]
2008-11-22 13:19:11 -06:00
Pratik Naik
a5cdb7a813
Remove stuff that was deprecated in 2-1-stable
2008-10-21 11:34:56 +01:00
Pratik Naik
6ef35461dc
Merge docrails
2008-09-03 17:58:47 +01:00
Jeremy Kemper
a1eb4e11c2
Get rid of 'Object#send!'. It was originally added because it's in Ruby 1.9, but it has since been removed from 1.9.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
Conflicts:
actionpack/test/controller/layout_test.rb
2008-08-31 13:20:15 -07:00