ActiveRecord ids differ outside of rails for rails data table?

X

Xeno Campanoli

Say, for a record with label 'Home', inside Rails I get an id of 1, and
outside I get an id of -6...... and a different number each time? What
is going on here? I am still getting the 'Home' label, and other fields
are correct, but I get a different id every time...???? What gives?
How do I get my regular id?
 
X

Xeno Campanoli

Xeno said:
Say, for a record with label 'Home', inside Rails I get an id of 1, and
outside I get an id of -6...... and a different number each time? What
is going on here? I am still getting the 'Home' label, and other fields
are correct, but I get a different id every time...???? What gives? How
do I get my regular id?
Nevermind. I was using the .id on the array object rather than the
record object. (he slinks away...)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top