0

i am still learning ruby on rails.

My first site is running but now i have this problem:

I run rails generate scaffold staat name:string hauptstadt:string einwohner:integer sprache:string

How is the best way for add a param like "test:string" for staat?

1 Answers1

0

Assuming you want to add another column to your database, just run:

rails g migration add_test_to_staats test:string

This will create a migration file under db/migrate

Open it up to make sure it's what you want.

The run bundle exec rake db:migrate

I would also recommend you go through docs that explains this further, here's a link:

http://guides.rubyonrails.org/active_record_migrations.html

neo
  • 4,078
  • 4
  • 25
  • 41