Michael King
2005-Oct-17 18:38 UTC
arrg, How to get Development messages from Production environment
I know I saw something about configuring Rails so that certain ip addresses would be shown developments error messages instead of the production error messages, but for the life of me I can''t seem to find it again. I''ve looked in old list messages, googled the web and I still can''t find it. Can someone please point me towards it so I can smack myself in the forhead and get back to work? - Michael
Jamis Buck
2005-Oct-17 18:49 UTC
Re: arrg, How to get Development messages from Production environment
Create a local_request? method in your Application controller that
returns true if the current request should be shown detailed error
messages. You can test on request.remote_ip to see if it matches one
or more known IP addresses, for example:
def local_request?
%w(12.34.56.78 24.68.13.57).include?(request.remote_ip)
end
- Jamis
On Oct 17, 2005, at 12:38 PM, Michael King wrote:
> I know I saw something about configuring Rails so that certain ip
> addresses would be shown developments error messages instead of the
> production error messages, but for the life of me I can''t seem to
find
> it again. I''ve looked in old list messages, googled the web and I
> still can''t find it.
>
> Can someone please point me towards it so I can smack myself in the
> forhead and get back to work?
>
> - Michael
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>