title: Determine if rails is running under a web server
body: <p>How do I tell if rails is running under a web server, as opposed to a script or irb?  </p>
  
  <p>For context: I'm tracking an ActiveRecord object, and I want to email alerts if the objects changes, <strong>but only</strong> if the changes came through the web interface.</p>