- 03 5月, 2010 1 次提交
-
-
由 Justin George 提交于
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: NJosé Valim <jose.valim@gmail.com>
-
- 03 4月, 2010 1 次提交
-
-
由 Jeremy Kemper 提交于
-
- 28 3月, 2010 1 次提交
-
-
由 Xavier Noria 提交于
-
- 12 3月, 2010 2 次提交
-
-
由 Jeroen van Dijk 提交于
-
由 José Valim 提交于
Allow anything that responds to render to be given as :template and use find_template instead of find in views.
-
- 09 3月, 2010 1 次提交
-
-
由 José Valim 提交于
-
- 08 3月, 2010 5 次提交
-
-
由 José Valim 提交于
-
由 José Valim 提交于
-
由 José Valim 提交于
-
由 José Valim 提交于
-
由 José Valim 提交于
-
- 01 2月, 2010 1 次提交
-
-
由 Yehuda Katz 提交于
For performance reasons, you can no longer call html_safe! on Strings. 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.
-
- 16 1月, 2010 1 次提交
-
-
由 José Valim 提交于
In heterogeneous collections, neither the @path nor the @template are available, so we need to tell that we are simply rendering a collection.
-
- 11 1月, 2010 1 次提交
-
-
由 José Valim 提交于
-
- 04 1月, 2010 2 次提交
-
-
由 José Valim 提交于
-
由 José Valim 提交于
-
- 26 12月, 2009 4 次提交
-
-
由 José Valim 提交于
-
由 José Valim 提交于
-
由 José Valim 提交于
-
由 José Valim 提交于
Wrap layout rendering in one method: _render_layout (this should make partial instrumentation easier).
-
- 02 12月, 2009 1 次提交
-
-
由 Joshua Peek 提交于
-
- 09 10月, 2009 1 次提交
-
-
由 Yehuda Katz 提交于
-
- 08 10月, 2009 1 次提交
-
-
由 Michael Koziarski 提交于
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.
-
- 16 8月, 2009 3 次提交
-
-
由 Yehuda Katz 提交于
Caches and cache clearing seems to actually work, but the actual architecture is kind of messy. Next: CLEAN UP.
-
由 Yehuda Katz 提交于
* 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
-
由 Yehuda Katz 提交于
* 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
-
- 12 8月, 2009 2 次提交
-
-
由 Yehuda Katz 提交于
-
由 Yehuda Katz 提交于
Further experimentation. Was able to cut the cost of rendering 100 partials 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.
-
- 09 8月, 2009 5 次提交
-
-
由 Yehuda Katz 提交于
-
由 Yehuda Katz 提交于
-
由 Yehuda Katz 提交于
-
由 Yehuda Katz 提交于
-
由 Jeremy Kemper 提交于
-
- 08 8月, 2009 2 次提交
-
-
由 Yehuda Katz 提交于
-
由 Yehuda Katz 提交于
-
- 07 8月, 2009 5 次提交
-
-
由 Yehuda Katz 提交于
* 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.
-
由 Yehuda Katz 提交于
* TODO: Review ActionController calling render_template for certain partials. Might we be able to save logic by always delegating to AV's render_partial?
-
由 Yehuda Katz 提交于
* _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
-
由 Yehuda Katz 提交于
* 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
-
由 Yehuda Katz 提交于
-