M
M
Meridian3122014-04-24 08:29:01
ruby
Meridian312, 2014-04-24 08:29:01

How to reference a table that was only created with a Rails migration?

rake db:migrate
We get the table, now we need to add new records to the table. The model does not exist.
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Kryak, 2014-04-24
@sck_v

ActiveRecord::Base.connection.execute('select * from table_name')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question