I created a record using rails g scaffold User name:string
and then created a new instance of User using the interface on the users view. Now I cannot find where the record has been saved. I checked my seeds.rb file? not there... Where does crud save records to? Thanks
EDIT: thanks for the db info
Seeds.rb is for seeding the database it is not the database itself. If you just ran rails new and then created a scaffold your default database is where the data will be saved. Assuming you ran the migrations.
If you want to interactively check if the data is there run rails console
, and from the interactive console you can query User (eg User.first
) to find the data you've saved.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.