-
rake db:create
-
rake db:new_migration[create_table_name]
-
add fields.
-
rake db:migrate
-
Example:
# app/models/template.rb # class ModelName < ActiveRecord::Base validates :title, presence: true validates :body, presence: true end
-
$ ruby app/main.rb
rubywarlock / templatedbapplication Goto Github PK
View Code? Open in Web Editor NEWThis App are Template Ruby Applications using Data Base and Migrations out off Rails