On Jan 9, 2006, at 2:18 PM, Kevin Clark wrote:

:back should be considered a 5-letter version of
request.env["HTTP_REFERER"] -- nothing more. And it's only there
because request.env["HTTP_REFERER"] is hard to remember in the first
place.

Any additional logic, including safety features, should be delegated
to a more advanced plugin for it.
--
David Heinemeier Hansson

I think it's clear I disagree with David on this point. If :back
exists then people who don't know any better (and some that do) will
use it which means mistakes will happen which cause their apps (and
tests) to error out.

I think that either:
1) :back should remain but should throw an exception on errors
or
2) remove :back.
Throwing an exception is not complicated (adds very little code) but
can be a great help to those who would otherwise get a non-helpful
error and then waste our time in IRC or the general mailing list. This
is NOT advanced logic.

Anyway, I'm working on a plugin to add the features that exist in my
patch. Hope to have it out sometime this week.
Kev

I agree. Is it possible, David, that you kind of regret having put it in there? The way you talk about it sounds like that's the case.

If you use :back because you can't remember request.env ['HTTP_REFERER'], and then find that your application redirects infinitely, you're going to have to pull the ugly details out and fix it anyway. Doesn't seem to really save anyone from pain except superficially.

Duane Johnson
(canadaduane)
http://blog.inquirylabs.com/


_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to