aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/render/rendering.rb
Commit message (Collapse)AuthorAgeFilesLines
* render(:inline) in a layout before yield replaces original contentNeeraj Singh2010-06-131-1/+1
| | | | | | [#4777 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Change event namespace ordering to most-significant first [#4504 state:resolved]Justin George2010-05-021-1/+1
| | | | | | | | | 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>
* Ensure details are frozen after @details_keys lookup. The implementation ↵José Valim2010-03-271-10/+1
| | | | waits to freeze until the last required moment, to avoid duping hashes.
* Improve performance of the rendering stack by freezing formats as a sign ↵José Valim2010-03-191-5/+11
| | | | that they shouldn't be further modified.
* Modify assert_template to use notifications. Also, remove ↵Carlhuda2010-03-171-2/+1
| | | | ActionController::Base#template since it is no longer needed.
* Add deprecation notices for <% %>.Carlhuda2010-03-151-2/+1
| | | | | | | | | | | | | | | | * 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.
* Remove formats setters from render template, speeding up partial and ↵José Valim2010-03-131-2/+1
| | | | collection renderings.
* Finish cleaning up rendering stack from views and move assigns evaluation to ↵José Valim2010-03-121-29/+8
| | | | controller (so plugins and/or controllers can overwrite just one method).
* Allow anything that responds to render to be given as :template and use ↵José Valim2010-03-121-5/+4
| | | | find_template instead of find in views.
* Clean LookupContext API.José Valim2010-03-081-5/+3
|
* Bring AM up to date with new rendering stack.José Valim2010-03-081-0/+2
|
* Speed up performance in resolvers by adding fallbacks just when required.José Valim2010-03-081-1/+1
|
* Rename Template::Lookup to LookupContext.José Valim2010-03-081-2/+2
|
* More refactoring on the views side of rendering.José Valim2010-03-081-69/+26
|
* Finally moved the find template logic to the views.José Valim2010-03-081-16/+24
|
* More cleanup on the layouts side.José Valim2010-03-081-6/+4
|
* Move layout lookup to views.José Valim2010-03-081-1/+15
|
* Added template lookup responsible to hold all information used in template ↵José Valim2010-03-071-6/+2
| | | | lookup.
* Solved a problem that prevented render :file => work in layoutsJose Fernandez2010-03-051-1/+1
| | | | Signed-off-by: wycats <wycats@gmail.com>
* Change AV formats so they can delegate to the controller. Now users (or ↵Carlhuda2010-03-011-2/+6
| | | | plugins) can override details_for_render in their controllers and add appropriate additional details. Now if only they could *do* something with those details...
* More html_safe strings now use the safe_concat methodSantiago Pastorino and José Ignacio Costa2010-02-051-1/+1
| | | | | | [#3856 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Add missing require for Object#try [#3771 state:resolved]Xavier Noria2010-01-221-0/+2
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Remove URI object from ActiveResource notification, send the :mailer class ↵José Valim2010-01-151-4/+1
| | | | in AM (like in AP#process_action) and remove locale instrumentation.
* Template rendering should include layout time.José Valim2010-01-151-10/+10
|
* Use underscore in notification namespaces.José Valim2010-01-041-2/+2
|
* Use namespaces in notifications.José Valim2010-01-031-2/+3
|
* Make rendering in ActionView happen through _render_template, as the ↵José Valim2009-12-311-30/+14
| | | | rendering which comes from ActionController.
* Remove ActionView inline logging to ActiveSupport::Notifications and create ↵José Valim2009-12-261-8/+1
| | | | 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.
* Break instrumentation into several end-points so rendering of partials can ↵José Valim2009-12-261-7/+17
| | | | be optimized.
* Wrap layout rendering in one method: _render_layout (this should make ↵José Valim2009-12-261-6/+6
| | | | partial instrumentation easier).
* Dont introspect inline templates for the logger and cleanup a few styling issuesDavid Heinemeier Hansson2009-12-211-13/+9
|
* When rendering layouts with blocks, use #capture to avoid assuming that the ↵Nathan Weizenbaum2009-11-051-4/+2
| | | | | | return value is the block's content. Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local>
* Remove ActionMailer helpers and rely on AbstractController one.José Valim2009-11-011-1/+1
|
* First pass at cleaning up action cachingYehuda Katz2009-10-281-1/+0
|
* Fix a bug where render :text could not handle yield :symbol. Fixes guides ↵Yehuda Katz2009-10-101-9/+13
| | | | generation
* Ported the new ActionView::TestCase from 2-3-stable to master [#3260Erik Ostrom2009-09-281-0/+1
| | | | | | | | | | | | | | | | | state:resolved] The test case now mimicks the template environment more closely, so it's possible to use render, load helper dependencies. This also fixes assert_select, and similar assertions. Because view tests and helpers generally don't render full templates assert_select looks first in rendered and then in output_buffer to find the rendered output. Additional `master'-only changes: Made the Action Pack Rakefile run the ActionView::TestCase tests, and made ActionView::Rendering#_render_text always return a string. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Clean up log output for rendered templatesJoshua Peek2009-09-241-2/+2
|
* Fixes ActionMailer regression [#3059 state:resolved]Yehuda Katz2009-08-151-1/+1
|
* More cleanup of ActionView and reduction in need for blocks in some cases:Yehuda Katz2009-08-151-16/+6
| | | | | | | | * 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-151-43/+18
| | | | | | | | | | * 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
* First pass at making partial rendering an Object. More cleanup to come.Yehuda Katz2009-08-081-2/+1
|
* Rename find_by_parts and find_by_parts? to find and exists?Yehuda Katz2009-08-071-2/+2
|
* WhitespaceYehuda Katz2009-08-071-7/+7
|
* Continue reworking the partial path.Yehuda Katz2009-08-071-3/+6
| | | | * 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-071-10/+23
| | | | | | | | | | 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-071-11/+7
| | | | | | | | * 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-071-9/+13
| | | | is optional
* Some more AV refactoring:Yehuda Katz2009-08-071-4/+4
| | | | | * 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-071-5/+11
|
* replace _render_*_from_controller with render_* as they are intended to be ↵Yehuda Katz2009-08-061-1/+1
| | | | public