aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/render/partials.rb
Commit message (Collapse)AuthorAgeFilesLines
* SReorganize autoloads slightly and move two files to lib/action_view root.José Valim2010-10-141-221/+0
|
* Clean up the house before moving in the new furniture.José Valim2010-10-101-173/+4
| | | | This commit moves all the template rendering logic that was hanging around AV::Base to renderer objects.
* fix rendering a partial with an array as its :object [#5746 state:resolved]Michael Koziarski2010-10-081-3/+7
| | | | | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> Conflicts: actionpack/lib/action_view/render/partials.rb
* render :template => 'foo/bar.json' now works as it should.José Valim2010-10-071-6/+8
|
* Make collection rendering faster.José Valim2010-10-071-2/+2
|
* Remove locals dependency from template.José Valim2010-10-071-35/+45
| | | | | | This means that templates does not need to store its source anymore, allowing us to reduce the ammount of memory taken by our Rails processes. Naively speaking, if your app/views contains 2MB of files, each of your processes (after being hit by a bunch of requests) will take 2MB less of memory after this commit. This is extremely important for the upcoming features. Since Rails will also render CSS and JS files, their source won't be stored as well allowing us to decrease the ammount of memory taken.
* reviews 02656acXavier Noria2010-09-131-18/+17
|
* copy-edits 4eb8987Xavier Noria2010-09-131-3/+3
|
* Add documentation for `:spacer_template` in Rails 3Prem Sichanugrist2010-09-131-0/+5
| | | This setting was existed since Rails 2.3.x, and seems like it have been left out when we rewriting the documentation.
* added documentation for :as and :object in PartialRendererCollin Miller2010-09-131-0/+32
| | | | Signed-off-by: Mikel Lindsaar <raasdnil@gmail.com>
* in Rendering objects with RecordIdentifier example, locals should reference ↵Mark Hayes2010-08-121-1/+1
| | | | @account not @buyer
* Merge remote branch 'rails/master'Xavier Noria2010-06-201-1/+1
|\ | | | | | | | | Conflicts: actionpack/lib/abstract_controller/base.rb
| * Make sure a namespaced <%= render form %> still renders the _form partial ↵Jan De Poorter2010-06-201-1/+1
| | | | | | | | | | | | [#4784 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* | Added title to some other files in actionpack/lib/action_viewRizwan Reza2010-06-161-0/+2
|/
* Optimize the code added in fa99de0bd054576336c9José Valim2010-05-151-9/+19
|
* make sure `as` is set before trying to build an #{as}_counter. [#2804 ↵Jeff Kreeftmeijer2010-05-151-1/+1
| | | | | | state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* partial counters with :as [#2804 state:resolved]Jeff Kreeftmeijer2010-05-151-0/+1
| | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Change event namespace ordering to most-significant first [#4504 state:resolved]Justin George2010-05-021-2/+2
| | | | | | | | | 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>
* Key partial name cache on controller and object class *names* to avoid ↵Jeremy Kemper2010-04-021-2/+2
| | | | memory leaks in dev mode
* adds missing requires for Object#blank? and Object#present?Xavier Noria2010-03-281-0/+2
|
* Merge remote branch 'mainstream/master'Pratik Naik2010-03-151-1/+1
|\
| * Allow anything that responds to render to be given as :template and use ↵José Valim2010-03-121-1/+1
| | | | | | | | find_template instead of find in views.
* | Merge remote branch 'mainstream/master'Pratik Naik2010-03-121-38/+10
|\| | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/base.rb railties/lib/rails/configuration.rb railties/lib/rails/log_subscriber.rb
| * Clean LookupContext API.José Valim2010-03-081-1/+1
| |
| * Rename Template::Lookup to LookupContext.José Valim2010-03-081-1/+1
| |
| * More refactoring on the views side of rendering.José Valim2010-03-081-26/+7
| |
| * More cleanup on the layouts side.José Valim2010-03-081-11/+2
| |
| * Move layout lookup to views.José Valim2010-03-081-1/+1
| |
| * Added template lookup responsible to hold all information used in template ↵José Valim2010-03-071-2/+2
| | | | | | | | lookup.
* | Updated documentation for block helpers in render/partials.rbJeroen van Dijk2010-03-121-3/+3
|/
* For performance reasons, you can no longer call html_safe! on Strings. ↵Yehuda Katz2010-01-311-1/+1
| | | | | | | | | | | | Instead, all Strings are always not html_safe?. Instead, you can get a SafeBuffer from a String by calling #html_safe, which will SafeBuffer.new(self). * Additionally, instead of doing concat("</form>".html_safe), you can do safe_concat("</form>"), which will skip both the flag set, and the flag check. * For the first pass, I converted virtually all #html_safe!s to #html_safe, and the tests pass. A further optimization would be to try to use #safe_concat as much as possible, reducing the performance impact if we know up front that a String is safe.
* 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.
* Provide useful information when instrumenting partials.José Valim2010-01-111-8/+6
|
* Use underscore in notification namespaces.José Valim2010-01-041-2/+2
|
* Use namespaces in notifications.José Valim2010-01-031-3/+4
|
* 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-261-19/+23
| | | | be optimized.
* Wrap layout rendering in one method: _render_layout (this should make ↵José Valim2009-12-261-1/+1
| | | | partial instrumentation easier).
* Fix @renderer warningJoshua Peek2009-12-011-10/+10
|
* 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.
* 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-151-8/+5
| | | | | | | | * 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-2/+4
| | | | | | | | | | * 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