erd icon indicating copy to clipboard operation
erd copied to clipboard

Fix that renaming model fails

Open sanfrecce-osaka opened this issue 5 years ago • 1 comments

Description

Renaming model fails when pushing save changes button. The order of the assignments are inappropriate.

Before

Image from Gyazo

sanfrecce-osaka avatar Apr 25 '19 12:04 sanfrecce-osaka

After

Image from Gyazo

Issue

Migration succeeds, but the renamed model isn't displayed on the ER diagram. The table name is changed but the class name and the file name are not. How much names do I need to change?

  • File name
    • ex. models/item.rb
  • Class name(definition)
    • ex. class Item < ApplicationRecord end
  • Class name(other places)
    • ex. Item.new
  • Variable name
    • ex. @item

I think that changing names above automatically is difficult. What do @amatsuda think?

sanfrecce-osaka avatar Apr 25 '19 12:04 sanfrecce-osaka