Is build_record a method?


Is build_record a method?

def create_record(attributes, raise_error = false)
  record = build_record(attributes)
  yield(record) if block_given?
  saved =
  raise if !saved && raise_error


The way it is written it looks like a method, but whether it is a built-in Ruby method or not, one cannot say. Do you have a link to this exercise?



I'm digging around in the docs and so far nothing definitive. Not sure if it is part of Rails or if somebody wrote the implementation. Will call in a Rails enthusiast...


build_record seems to be part of Rails' source code, although I don't recall having seen it before.