views:

143

answers:

1

In my config/environments/development.rb I have the following line:

config.action_controller.consider_all_requests_local = true

which means I should get all the ugly error stuff when in development environment. But for some reason my app has suddenly started giving me the pretty error page you're supposed to see on production.

Is there possibly some place where this may have been over-ridden? Other people are working on the project as well so maybe one of them did something to cause it.

A: 

Someone might be overriding the local_request? (api) method somewhere, it's a way to always show the proper error page.

I just answered someone else's question on how to override it. You basically just would put a method in one of the controllers (like ApplicationController) like this:

def local_request?
  false
end

So, possibly someone used that somewhere. Do a full project search in textmate or using grep.

Dan McNevin
I haven't found any occurences of local_request?... anything else?
tybro0103
That's the only way I know of.. Maybe you can set up a similar method but always return true if RAILS_ENV == "development" in the ApplicationController or the controller that you're working in.Another thing would be to use ./script/server -u and put a "debugger" in close to what's generating the error and just use 'next' to step though the code and see where the error page is being generated from.
Dan McNevin