aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/render
Commit message (Collapse)AuthorAgeFilesLines
* Caches and cache clearing seems to actually work, but the actual ↵Yehuda Katz2009-08-151-49/+73
| | | | architecture is kind of messy. Next: CLEAN UP.
* More cleanup of ActionView and reduction in need for blocks in some cases:Yehuda Katz2009-08-152-24/+11
| | | | | | | | * only one of partial_name or :as will be available as a local * `object` is removed * Simplify _layout_for in most cases. * Remove <% render :partial do |args| %> * <% render :partial do %> still works fine
* Clean up ActionView some:Yehuda Katz2009-08-152-45/+22
| | | | | | | | | | * Call _evaluate_assigns_and_ivars at the two entry points so we don't have to do a check at every render. * Make template.render viable without having to go through a wrapper method * Remove old TemplateHandler#render(template, local_assigns) path so we don't have to set self.template every time we render a template. * Move Template rescuing code to Template#render so it gets caught every time. * Pull in some tests from Pratik that test render @object in ActionView
* Tentatively accept the ":as or :object, but not both" solutionYehuda Katz2009-08-111-22/+21
|
* Further experimentation. Was able to cut the cost of rendering 100 partials ↵Yehuda Katz2009-08-111-9/+40
| | | | | | | | | | in a collection in half. To discuss: What are the desired semantics (if any) for layouts in a collection. There are no tests for it at present, and I'm not sure if it's needed at all. Deprecated on this branch: `object` pointing at the current object in partials. You can still use the partial name, or use :as to achieve the same thing. This is obviously up for discussion.
* Cache some more things to improve partial perfYehuda Katz2009-08-091-3/+3
|
* Went from 25% slower partials (vs. 2.3) to 10% faster. More to come.Yehuda Katz2009-08-091-3/+7
|
* Clean up partial object some more; replace passing around a block to a ↵Yehuda Katz2009-08-091-35/+39
| | | | single block ivar
* Clean up initializer and some of the internals of PartialRendererYehuda Katz2009-08-091-49/+41
|
* Ruby 1.9 compat: can't implicitly set instance var using block argJeremy Kemper2009-08-081-2/+2
|
* First pass at making partial rendering an Object. More cleanup to come.Yehuda Katz2009-08-082-62/+83
|
* Rename find_by_parts and find_by_parts? to find and exists?Yehuda Katz2009-08-072-3/+3
|
* Get all ActionController partial rendering to use ActionView's partial code. ↵Yehuda Katz2009-08-071-0/+4
| | | | | | | | | | | | | | 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.
* WhitespaceYehuda Katz2009-08-071-7/+7
|
* Continue reworking the partial path.Yehuda Katz2009-08-072-47/+22
| | | | * TODO: Review ActionController calling render_template for certain partials. Might we be able to save logic by always delegating to AV's render_partial?
* Modify various partial methods to carry along the block that can be passed ↵Yehuda Katz2009-08-072-42/+52
| | | | | | | | | | in with render * _render_single_template, which renders a template without layout * _render_partial_unknown_type, which renders a partial of unknown type (the entry method for most partial rendering; supports strings, objects, and collections) * _render_partial_object, which renders a partial for a single object. * extracted _render_partial_path so it can be used to render the spacer without going through the public render :partial
* Some more AV work:Yehuda Katz2009-08-072-26/+25
| | | | | | | | * rename _render_partial to _render_partial_unknown_type to reflect that for this call, we don't know the type. * Merge _render_partial_with_block and _render_partial_with_layout to _render_partial * TODO: Check to see if any more logic can be shared * TODO: See about streamlining block path so we can get rid of @_proc_for_layout * Remove @exempt_from_layout as it is no longer needed
* Replace _render_template_with_layout with _render_template since the layout ↵Yehuda Katz2009-08-072-11/+15
| | | | is optional
* Some more AV refactoring:Yehuda Katz2009-08-072-15/+6
| | | | | * remove no longer used _array_like_objects * _render_content_with_layout renamed to _render_content since layout it optional * remove check for optional layout before _render_content
* Start cleaning up partial pathYehuda Katz2009-08-072-9/+17
|
* This is handled by the resolver nowYehuda Katz2009-08-071-24/+5
|
* Clean up render @object a bit more.Yehuda Katz2009-08-071-6/+19
|
* Improve a path in _render_partialYehuda Katz2009-08-061-24/+23
|
* replace _render_*_from_controller with render_* as they are intended to be ↵Yehuda Katz2009-08-062-2/+2
| | | | public
* Simplify required "ActionView compliant" APIYehuda Katz2009-07-191-4/+2
|
* Remove deprecated implicit ivar assignmentJoshua Peek2009-06-251-26/+0
|
* Minor ActionView cleanupYehuda Katz + Carl Lerche2009-06-181-3/+1
|
* Fix typoYehuda Katz + Carl Lerche2009-06-181-1/+1
|
* Extract the layout proc into a method, and write documentation explaining ↵Yehuda Katz + Carl Lerche2009-06-171-5/+38
| | | | what the proc does in various cases.
* Drive the final stake through @content_for_*'s heart!Yehuda Katz + Carl Lerche2009-06-172-25/+14
|
* Cleaning up if defined?(ActionController::Http) blocks from the pre new base ↵Yehuda Katz + Carl Lerche2009-06-171-1/+0
| | | | era.
* Break up DependencyModule's dual function of providing a "depend_on" DSL and ↵Joshua Peek2009-05-281-1/+1
| | | | "included" block DSL into separate modules. But, unify both approaches under AS::Concern.
* Implemented redirects and partial rendering in new base.Yehuda Katz + Carl Lerche2009-05-122-12/+25
|
* Deprecate template, session, assigns, and layout accessors on response ↵Joshua Peek2009-04-281-1/+1
| | | | object. Instead access them through the controller instance. This mainly affects functional test assertions.
* Refactor ActionView::TemplateYehuda Katz + Carl Lerche2009-04-271-6/+7
| | | | | | | | ActionView::Template is now completely independent from template storage, which allows different back ends such as the database. ActionView::Template's only responsibility is to take in the template source (passed in from ActionView::Path), compile it, and render it.
* Refactor ActionView::PathYehuda Katz + Carl Lerche2009-04-222-5/+6
| | | | | | | | * Decouple from ActionController and ActionMailer * Bring back localization support. * Prepare to decouple templates from the filesystem. * Prepare to decouple localization from ActionView * Fix ActionMailer to take advantage of ActionView::Path
* Bring abstract_controller up to date with rails/masterCarl Lerche & Yehuda Katz2009-04-131-14/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolved all the conflicts since 2.3.0 -> HEAD. Following is a list of commits that could not be applied cleanly or are obviated with the abstract_controller refactor. They all need to be revisited to ensure that fixes made in 2.3 do not reappear in 3.0: 2259ecf368e6a6715966f69216e3ee86bf1a82a7 AR not available * This will be reimplemented with ActionORM or equivalent 06182ea02e92afad579998aa80144588e8865ac3 implicitly rendering a js response should not use the default layout [#1844 state:resolved] * This will be handled generically 893e9eb99504705419ad6edac14d00e71cef5f12 Improve view rendering performance in development mode and reinstate template recompiling in production [#1909 state:resolved] * We will need to reimplement rails-dev-boost on top of the refactor; the changes here are very implementation specific and cannot be cleanly applied. The following commits are implicated: 199e750d46c04970b5e7684998d09405648ecbd4 3942cb406e1d5db0ac00e03153809cc8dc4cc4db f8ea9f85d4f1e3e6f3b5d895bef6b013aa4b0690 e3b166aab37ddc2fbab030b146eb61713b91bf55 ae9f258e03c9fd5088da12c1c6cd216cc89a01f7 44423126c6f6133a1d9cf1d0832b527e8711d40f 0cb020b4d6d838025859bd60fb8151c8e21b8e84 workaround for picking layouts based on wrong view_paths [#1974 state:resolved] * The specifics of this commit no longer apply. Since it is a two-line commit, we will reimplement this change. 8c5cc66a831aadb159f3daaffa4208064c30af0e make action_controller/layouts pick templates from the current instance's view_paths instead of the class view_paths [#1974 state:resolved] * This does not apply at all. It should be trivial to apply the feature to the reimplemented ActionController::Base. 87e8b162463f13bd50d27398f020769460a770e3 fix HTML fallback for explicit templates [#2052 state:resolved] * There were a number of patches related to this that simply compounded each other. Basically none of them apply cleanly, and the underlying issue needs to be revisited. After discussing the underlying problem with Koz, we will defer these fixes for further discussion.
* Updated old AC::Base for small changes to AVYehuda Katz and Carl Lerche2009-04-081-1/+1
|
* Working on being able to render :text with layoutsCarl Lerche2009-03-231-4/+2
|
* Reorganize ActionController folder structureJoshua Peek2009-01-271-0/+28
|
* Begin unifying the interface between ActionController and ActionViewYehuda Katz2009-01-222-0/+419