简体   繁体   中英

Rails - A gem to add stuff to my database?

When I build an API to handle my classes, if I want to add data, I have to make CURL commands through the terminal. Is there a simple way to do this ? So I'm looking for a gem (or other stuff) to handle my database easily, by myself (with no access for the users)

I've already found this : https://github.com/igorkasyanchuk/rails_db But it's only to view content, not to add some.

Thanks !

I would suggest reading the Getting Started Guide (again?) closely as this is one of the central functions of the rails framework. If you are building an application with rails, you should be able to use the rails generate command to set up scaffolds, models, controllers, etc. And when you set up models, they will be persisted to whichever database you have set up (sqlite by default) when you call save on them.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM