You should only do student.id
. Even if you don't see the id
field (or other field) in the Student.rb
, if it exists in the database, you can access to it with the field name.
In a way of example i'm attaching an image of something like that but in rails console
and my entity is called user