class ActiveAdmin::ErrorLoading

def find_cause(folder, backtrace)

Locates the most recent file and line from the caught exception's backtrace.
def find_cause(folder, backtrace)
  backtrace.grep(/\/(#{folder}\/.*\.rb):(\d+)/) { [$1, $2] }.first
end