L
L
lavezzi12015-07-25 20:53:38
Ruby on Rails
lavezzi1, 2015-07-25 20:53:38

How to change the name of a controller created via scaffold?

Let's say I generated rails users

g scaffold Username:string email:string
and I want to change the name User to another, manually change everything?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
CapeRatel, 2015-07-25
@lavezzi1

Working with scaffolds when you don't own the tools is bad practice.
With the user scaffold, you have created:
model - User
controller - Users
route - resources: users
migration to the database to create a user.
What do you want to change?

C
caution, 2015-07-26
@caution

rails destroy scaffold User name:string email:string
rails g scaffold NEW_NAME name:string email:string

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question