aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/render
Commit message (Collapse)AuthorAgeFilesLines
* In heterogeneous collections, neither the @path nor the @template are ↵José Valim2010-01-151-1/+1
| | | | available, so we need to tell that we are simply rendering a collection.
* 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
|
* Provide useful information when instrumenting partials.José Valim2010-01-111-8/+6
|
* Use underscore in notification namespaces.José Valim2010-01-042-4/+4
|
* Use namespaces in notifications.José Valim2010-01-032-5/+7
|
* 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.
* More <%= render(@posts) %> optimization.José Valim2009-12-261-24/+20
|
* Optimize <%= render(@posts) %>.José Valim2009-12-261-4/+14
|
* Break instrumentation into several end-points so rendering of partials can ↵José Valim2009-12-262-26/+40
| | | | be optimized.
* Wrap layout rendering in one method: _render_layout (this should make ↵José Valim2009-12-262-7/+7
| | | | partial instrumentation easier).
* Dont introspect inline templates for the logger and cleanup a few styling issuesDavid Heinemeier Hansson2009-12-211-13/+9
|
* Fix @renderer warningJoshua Peek2009-12-011-10/+10
|
* 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
* Fix issue with standalone ActionViewYehuda Katz2009-10-091-1/+4
|
* Switch to on-by-default XSS escaping for rails.Michael Koziarski2009-10-081-1/+1
| | | | | | | | | | | | This consists of: * String#html_safe! a method to mark a string as 'safe' * ActionView::SafeBuffer a string subclass which escapes anything unsafe which is concatenated to it * Calls to String#html_safe! throughout the rails helpers * a 'raw' helper which lets you concatenate trusted HTML from non-safety-aware sources (e.g. presantized strings in the DB) * New ERB implementation based on erubis which uses a SafeBuffer instead of a String Hat tip to Django for the inspiration.
* 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
|
* 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
|