Challenge
Michael D. Ivey
ivey at gweezlebur.com
Fri Nov 16 11:20:23 EST 2007
On Nov 16, 2007, at 9:15 AM, Chris Farmiloe wrote:
>> BTW: Merb already defines MovedPermanently and MovedTemporarily, but
>> they don't take the arg for the new URL. We should add that:
>> raise MovedPermanently.new(new_url)
>
> A built in handler for the Moved__ error classes would be nice too.
>
> raise MovedTemporaily.new(url)
>
> would be roughly equal to
>
> redirect(url) and throw(:halt)
Yep, that should be in the default generated Exceptions controller.
What sensible default should MovedPermanently use for the url? I
guess just nil, and if you don't specify one moved_permanently would
display the error.
I'll work on this next week if no one else does.
More information about the Merb-devel
mailing list