Commit Graph

10 Commits

Author SHA1 Message Date
Yehuda Katz + Carl Lerche
e3744166ec Refactor ActionController to use find_template and template_exists? 2009-09-03 12:52:53 -07:00
Yehuda Katz + Carl Lerche
86c7b144fa Add a TODO so we remember to fix partial layouts 2009-08-25 16:02:26 -07:00
Yehuda Katz
9b552fb300 Caches and cache clearing seems to actually work, but the actual architecture is kind of messy. Next: CLEAN UP. 2009-08-15 12:32:01 -07:00
Yehuda Katz
4bf516e072 More perf work:
* Move #set_cookie and #delete_cookie inline to optimize. These optimizations should
    almost certainly be sent back upstream to Rack. The optimization involves using
    an ivar for cookies instead of indexing into the headers each time.
  * Was able to use a bare Hash for headers now that cookies have their own joining
    semantics (some code assumed that the raw cookies were an Array).
  * Cache blankness of body on body=
  * Improve expand_cache_key for Arrays of a single element (common in our case)
  * Use a simple layout condition check unless conditions are used
  * Cache visible actions
  * Lazily load the UrlRewriter
  * Make etag an ivar that is set on prepare!
2009-08-11 15:03:53 -07:00
Yehuda Katz
02d9dd9000 Add some more caching to the lookup 2009-08-11 15:03:52 -07:00
Yehuda Katz
d0301e13f4 First pass at making partial rendering an Object. More cleanup to come. 2009-08-08 12:44:26 -03:00
Yehuda Katz
010a0c92eb Rename find_by_parts and find_by_parts? to find and exists? 2009-08-07 15:00:12 -03:00
José Valim
aed135d3e2 Renamed presenter to renderer, added some documentation and defined its API. 2009-08-07 17:17:51 +02:00
Yehuda Katz
bfe58ac05d Get all ActionController partial rendering to use ActionView's partial code. Consequences:
* It is not possible to always pre-determine the layout before going to ActionView.
    This was *already* broken for render :partial => @object, :layout => true. This is
    now handled by overriding render_to_body in layouts.rb and manually injecting the
    partial's response. This needs to be done in ActionController since ActionController
    knows enough to get _layout_for_option. There is probably a better abstraction here.
  * As a result, all partial rendering can correctly restrict their layouts to the mime
    type of the rendered partial. This could have previously caused a bug in some edge cases.
  * If other layout-like options are added, they might need to add special code for the
    case of render :partial. We should try to think of an alternate solution, if possible,
    but this works for the cases we know of now.
2009-08-07 11:33:54 -03:00
Yehuda Katz
71638e6760 Move AbstractController to a top-level component 2009-08-06 22:51:24 -03:00