How can I query the existing records in my imported database in Rails?
<p>I am now developoing a rails project, but I am using an existing database of MySQL. Well, I have already connected the project with MySQL database, and in former times, I used to created models together with the database migration.</p>

<p>Like, when I create a new Class for the Model part, I used "bundle exec rake db:migration" to create a new database table, and the activerecords are connected.</p>

<p>But now the sequence is a little bit different, I had my database tables first, and then I wanted to query the records using a newly-built class on rails. For example, I had a table of students in MySQL database, and then I wanted to query the records of all the student by creating the new class Student, and create a new search method in the Student Controller.</p>

<p>But now I have not even a clue, because this is new to me, anyone can come for a little help??? Thanks a lot!</p>