Why I got ActiveRecord::Relation object?
I try to get a car instance from database,

    theCar = Car.where(:name => 'TOYOTA')
    puts theCar.user_name

I got the error message: **undefined method `user_name' for
ActiveRecord::Relation:0xb6837b54**

Why I got **ActiveRecord::Relation** object, not **Car** object?? What could be the cause? By the way, I query the car inside my migration file. I am using Rails 3.

Why I got ActiveRecord::Relation object?
===

I try to get a car instance from database,

    theCar = Car.where(:name => 'TOYOTA')
    puts theCar.user_name

I got the error message: **undefined method `user_name' for
ActiveRecord::Relation:0xb6837b54**

Why I got **ActiveRecord::Relation** object, not **Car** object?? What could be the cause? By the way, I query the car inside my migration file. I am using Rails 3.
