Model Rails

Estimated reading time: 1 minute

What is model?

genearte model

rails g model Post
# or with db elements
rails g model Post title:string

genearte controller

rails g controller Posts
# 
rails g scaffold Article title:string body:text
  • official link

  • https://learn.co/lessons/rails-resource-and-scaffold-generator
  • http://guides.rubyonrails.org/active_record_basics.html
ruby, rails, ruby on rails