module ActiveModelSerializers

def self.location_of_caller

The file name and line number of the caller of the caller of this method.
def self.location_of_caller
  caller[1] =~ /(.*?):(\d+).*?$/i
  file = Regexp.last_match(1)
  lineno = Regexp.last_match(2).to_i
  [file, lineno]
end