まぁ500はerrorの方が良いかなぁ

On Sat, Sep 7, 2013 at 1:07 AM, m-kanno <notifications@github.com> wrote:

>> @@ -4,4 +4,21 @@ class ApplicationController < ActionController::Base
>>    # Prevent CSRF attacks by raising an exception.
>>    # For APIs, you may want to use :null_session instead.
>>    protect_from_forgery with: :exception
>> +
>> +  if Rails.env.production?
>> +    rescue_from ActiveRecord::RecordNotFound, :with => :render_404
>> +    rescue_from ActionController::RoutingError, :with => :render_404
>> +    rescue_from Exception, :with => :render_500
>> +  end
>> +
>> +  [404, 403, 500].each do |status|
>> +    define_method("render_#{status}",
>> +                  -> (exception = nil) {
>> +                    if exception
>> +                      logger.info "Rendering #{status} with exception: #{exception.message}"
> `logger.error`じゃなくて`logger.info` でいいの？
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/myfoot/sepia/pull/95/files#r6211887