class ViewModel::Record

def model_class

name of this viewmodel.
set via `model_class_name=`, attempt to automatically resolve based on the
Returns the AR model class wrapped by this viewmodel. If this has not been
def model_class
  unless instance_variable_defined?(:@model_class)
    # try to auto-detect the model class based on our name
    self.model_class_name =
      ViewModel::Registry.infer_model_class_name(self.view_name)
  end
  @model_class
end