Adding a new field to Rails model

You must generate a migration:

rails g migration add_columnc_to_myodb2s columnc:string

It should contain a row of adding a column to your table.

add_column :myodb2s, :columnc, :string

This adds the column to yourdb table, and of course to your model, but not in any view. You need to add it manually. As far s I know.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)