Exception: ActiveAdmin::ErrorLoading

Inherits:
Error
  • Object
show all
Defined in:
lib/active_admin/error.rb

Direct Known Subclasses

DatabaseHitDuringLoad, DependencyError

Instance Method Summary collapse

Instance Method Details

#find_cause(folder, backtrace) ⇒ Object

Locates the most recent file and line from the caught exception’s backtrace.



27
28
29
# File 'lib/active_admin/error.rb', line 27

def find_cause(folder, backtrace)
  backtrace.grep(/\/(#{folder}\/.*\.rb):(\d+)/) { [$1, $2] }.first
end