I thought it would be convenient to set the data in the table, so I will record the data setting in one or more tables. In both cases, save is performed at the end. Don't forget! An error will occur when retrieving the data !!
command
rails console
Variable 1=Model name.new(Column name: "Contents")
test1 = Test.new(description: "smple_text")
Variable 1.save
test1.save
Enter , </ strong> in the previous command.
command
rails console
Variable 1=Model name.new(Column name: "Contents",Column name: "Contents")
test1 = Test.new(description: "smple_text",title: "smple_title" )
Variable 1.save
test1.save
Thank you for reading this far. That's all for creating the data in the table. Please make use of it.
Also, there is a link on Twitter / Portfolio, so if you are interested, Please connect. I would be very happy to have friends who can share programming learning.
Recommended Posts