Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #8958 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

[PATCH] Remove all deprecated render methods

Reported by: lifofifo Assigned to: nzkoz
Priority: normal Milestone:
Component: ActionPack Version: edge
Severity: major Keywords: removal cleanup verified
Cc: tarmo

Description

This patch removes deprecated methods such as render_text, render_xml etc. It also refactors rendering related code to get rid of things added to support deprecated methods.

Additionally, it adds support for hash collection with render partial.

Attachments

remove_all_deprecated_render_methods.2.patch (35.5 kB) - added by lifofifo on 07/12/07 00:14:21.
remove_all_deprecated_render_methods.patch (35.5 kB) - added by lifofifo on 07/12/07 00:14:53.
remove_all_deprecated_render_methods.3.patch (35.5 kB) - added by lifofifo on 07/24/07 01:36:39.
Updated against latest edge
remove_all_deprecated_render_methods_latest_edge.patch (35.9 kB) - added by lifofifo on 08/28/07 23:30:52.
Updated against latest edge

Change History

07/12/07 00:14:21 changed by lifofifo

  • attachment remove_all_deprecated_render_methods.2.patch added.

07/12/07 00:14:53 changed by lifofifo

  • attachment remove_all_deprecated_render_methods.patch added.

07/12/07 00:15:53 changed by lifofifo

Oops, my bad. Both patches are same.

(follow-up: ↓ 3 ) 07/15/07 21:40:34 changed by mislav

  • keywords set to removal cleanup.
  • type changed from defect to enhancement.
  • severity changed from normal to major.

Looks nice; applies cleanly, tests pass.

Why render_for_text and render_for_file?

(in reply to: ↑ 2 ) 07/15/07 21:47:58 changed by lifofifo

Replying to mislav:

Why render_for_text and render_for_file?

That's to prevent people from using them. Actually the same reasons why AR::Base.find_first was renamed to find_one.

Thanks.

07/20/07 09:22:37 changed by manfred

Looks good. +1

07/24/07 01:36:39 changed by lifofifo

  • attachment remove_all_deprecated_render_methods.3.patch added.

Updated against latest edge

07/24/07 02:20:22 changed by mpalmer

I don't like the idea of having the "hash collection with render :partial" change mixed in with the removal of deprecated methods. lifo has indicated on IRC that there is no reason why the two changes have to be applied together, so I'm -1 on the patch as-is. I'll gladly re-evaluate a revised patch that only removes deprecated methods.

07/24/07 02:30:41 changed by lifofifo

This is kinda annoying putting my words in twisted way. My exact words were in IRC were "It was on a separate ticket. But I combined it after talking to some folks here. It's very trivial I think." If you have anything off-topic to say, please use mailing list.

My old ticket is found at http://dev.rubyonrails.org/ticket/8900

And as I had done some cleanup there, nzkoz suggested I can do it in a separate ticket with cleaning up other parts as well.

Thanks.

07/24/07 04:01:28 changed by mpalmer

If nzkoz is happy to apply the patch in it's current form, so be it. You don't need my vote then.

07/24/07 20:54:39 changed by nzkoz

definitely would prefer the two seperated out, but if it's a huge deal, then perhaps it's no big deal.

07/24/07 21:14:14 changed by lifofifo

Well, the code I wrote for supporting hash collection, touches the same part of code as cleanup. So if I had kept them in separate tickets, that'd have just added interdependency of patches, I might have ended up with 3 separate tickets based on the order in which patches got submitted.

So I just made one ticket to save all that trouble :)

08/20/07 00:24:45 changed by tarmo

  • cc set to tarmo.

Applies, tests pass. Looks clean apart from a minor whitespace addition in "actionpack/lib/action_controller/base.rb" after line 618 containing the word "protected".

+1, if the whitespace things gets cleaned up.

08/27/07 16:40:52 changed by lifofifo

  • keywords changed from removal cleanup to removal cleanup verified.

08/27/07 16:43:51 changed by norbert

Hooray! +1

08/28/07 23:30:52 changed by lifofifo

  • attachment remove_all_deprecated_render_methods_latest_edge.patch added.

Updated against latest edge

08/28/07 23:41:03 changed by lifofifo

Reverified

09/03/07 00:18:34 changed by nzkoz

  • status changed from new to closed.
  • resolution set to fixed.

(In [7403]) Remove deprecated functionality from actionpack. Closes #8958 [lifofifo]