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)


_______________________________________________
Merb-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/merb-devel

Reply via email to