• S
    Extra caller details added to ActiveRecord::RecordNotFound · d763956e
    Sameer Rahmani 提交于
    ActiveRecord::RecordNotFound modified to store model name, primary_key
    and id of the caller model. It allows the catcher of this exception to make
    a better decision to what to do with it. For example consider this simple
    example:
    
        class SomeAbstractController < ActionController::Base
          rescue_from ActiveRecord::RecordNotFound, with: :redirect_to_404
    
          private def redirect_to_404(e)
            return redirect_to(posts_url) if e.model == 'Post'
            raise
          end
        end
    d763956e
可在Tags中查看这些版本中当前仓库的状态.
CHANGELOG.md 29.1 KB