Challenge
Chris Farmiloe
chris at oxdi.eu
Fri Nov 16 10:15:41 EST 2007
On 16 Nov 2007, at 14:52, Michael D. Ivey wrote:
> I had never thought of pushing it all into the model. It may be a
> "violation of MVC" to raise controller exceptions from inside models,
> but is that a bad thing? Raising "Moved" with the new name is
> excellent.
I've been playing with a fork of merb for one production app, and for
me ControllerExceptions are more like ApplicationExceptions not
specific to controller-land
> Have you used a pattern like this in production yet?
On a few rails apps, I've used something similar, although without
merb's exception controllers its a bit messy.
try:
http://www.africacollection.co.uk/pages/1-holidays-to-southern-africa-the-indian-ocean
then
http://www.africacollection.co.uk/pages/1-holidays-to-southern-africa-blah-blah-blah
> 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)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/merb-devel/attachments/20071116/7f7c3761/attachment-0001.html
More information about the Merb-devel
mailing list