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.


24
25
26
# File 'lib/active_admin/error.rb', line 24

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