I just noticed something I think is interesting and wanted to see what
everyone felt about it. Using a quick and dirty scaffold to create a
resource, I found that if I hit a show url, with an invalid id, it
will throw an exception in html instead of xml.
Here is how you repeat this.
$ rails testing_rest
$ cd testing_rest
$ ./script/generate scaffold person name:string
$ rake db:migrate
$ ./script/server
Thanks for the reply. That would be much easier. The filters are
nice, unfortunately, it doesn't catch things like
ActionController::RoutingErrors. At least its not for me. It does
catch things like notfound errors within an action though.
Thanks for the reply. That would be much easier. The filters are
nice, unfortunately, it doesn't catch things like
ActionController::RoutingErrors. At least its not for me. It does
catch things like notfound errors within an action though.
You are right, it won't catch routing errors as they are thrown before
the surround_filters get a chance to party