What is build_record in this? Another method? If so where does the method exist?


#1




No error message. Nil is what comes out on the screen.


def create_record(attributes, raise_error = false)
  record = build_record(attributes)
  yield(record) if block_given?
  saved = record.save
  set_new_record(record)
  raise RecordInvalid.new(record) if !saved && raise_error
  record
end


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.