1

I have a table in my database that already exists medium genre, the command rails generate model but now I want to generate the views, its controller, helper and html, what generates when making scaffold, is there a command that allows me to do this?

my table:

class CreateTypeControlAccesses < ActiveRecord::Migration
  def change
    create_table :type_control_accesses do |t|
      t.string :name

      t.timestamps null: false
    end
  end
end
AlexCs
  • 55
  • 7

1 Answers1

0

If you want it to use scaffold you can run the following in the terminal

rails g scaffold [controller_name]

Make sure that your controller name is the plural version of your model

Ex. model = user; controller/scaffold = users