I'm using Rails and in a controller, I have a database called log_cons and it has an entry all filled in whereby the first column is "id" and the value is "1"
@log_cons = LogCon.all
puts @log_cons[1].id
This outputs to the browser:
Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id
and prints an empty line in the terminal.
What could be some potential reasons for this?