Flowdock
method

create_sandbox

Importance_0
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: ScaffoldGenerator

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v1.2.6) is shown here.

create_sandbox() protected

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb, line 169
    def create_sandbox
      sandbox = ScaffoldingSandbox.new
      sandbox.singular_name = singular_name
      begin
        sandbox.model_instance = model_instance
        sandbox.instance_variable_set("@#{singular_name}", sandbox.model_instance)
      rescue ActiveRecord::StatementInvalid => e
        logger.error "Before updating scaffolding from new DB schema, try creating a table for your model (#{class_name}) named #{class_name.tableize}."
        raise SystemExit
      end
      sandbox.suffix = suffix
      sandbox
    end
Register or log in to add new notes.