title: Exception notifier - how to display own error pages?
body: <p>I use <strong>exception_notification</strong> gem for handling an errors in an app.
  My <strong>ApplicationController</strong> looks like this:</p>
  <pre><code>unless Rails.application.config.consider_all_requests_local
      rescue_from Exception,
                  :with =&gt; :render_error
      rescue_from ActiveRecord::RecordNotFound,
                  :with =&gt; :render_not_found
      rescue_from ActionController::RoutingError,
                  :with =&gt; :render_not_found
      rescue_from ActionController::UnknownController,
                  :with =&gt; :render_not_found
      rescue_from ActionController::UnknownAction,
                  :with =&gt; :render_not_found
    end
  
    def render_not_found(exception)
      ExceptionNotifier::Notifier
        .exception_notification(request.env, exception)
        .deliver
      render :template =&gt; &quot;/errors/404.html.erb&quot;,
        :layout =&gt; 'errors.html.erb'
      return     
    end
  
    def render_error(exception)
      ExceptionNotifier::Notifier
        .exception_notification(request.env, exception)
        .deliver
      render :template =&gt; &quot;/errors/500.html.erb&quot;,
             :layout =&gt; 'errors.html.erb'
      return
    end
  </code></pre>
  <p>In <strong>/config/enviroments/productions.rg</strong> in the end of the file I have:</p>
  <pre><code>config.middleware.use ExceptionNotifier,
    :email_prefix =&gt; &quot;[MY APP| Error Report] &quot;,
    :sender_address =&gt; %{&quot;MY APP&quot; &lt;err@my-app.com&gt;},
    :exception_recipients =&gt; 'my_email@gmail.com'
  end
  </code></pre>
  <p>when I get the error on the app - eg. <code>Article.find(not-existing-ID)</code>, I'll get the standard error page (ERROR 500) from <code>/public/500.html</code> and not from the file specified  in application controller... How is that possible? Past hours I tried to find the problem, but I still don't know the issue.</p>