Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #7316: suggest_default_table_on_scaffold_generate.diff

File suggest_default_table_on_scaffold_generate.diff, 0.9 kB (added by jeremymcanally, 2 years ago)
  • railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb

    old new  
    173173        sandbox.model_instance = model_instance 
    174174        sandbox.instance_variable_set("@#{singular_name}", sandbox.model_instance) 
    175175      rescue ActiveRecord::StatementInvalid => e 
    176         logger.error "Before updating scaffolding from new DB schema, try creating a table for your model (#{class_name})
     176        logger.error "Before updating scaffolding from new DB schema, try creating a table for your model (#{class_name}) named #{class_name.tableize.pluralize}.
    177177        raise SystemExit 
    178178      end 
    179179      sandbox.suffix = suffix