I created the migration file as follows before creating the model, view, or controller
class Papaers < ActiveRecord::Migration
def self.up
create_table :papers do |t|
t.integer :unit_id, :null=>false
t.integer :document_id, :null=>false
t.timestamps
end
end
def self.down
drop_table :papers
end
end
This works well and creates a table. But now I want to create a model for this table. Is there a way to create a model in rails after running the migration files? I could not see any model created under the documents in the model.
source
share