Hello I've set up a One-to-Many Association between "orders" and "users". I'm wondering how to have console just return an array containing ID's rather than a full array of data:
user = User.find_by_login("Lesa")
user.orders => [#, #]
user.orders.id
NoMethodError: undefined method `order' for #<User:0x10351f320>
from /Users/justinz/.gem/ruby/1.8/gems/activerecord-2.3.5/lib/active_record/attribute_methods.rb:260:in `method_missing'
from (irb):10
I also tried user.order.id, and received the same message. What am I doing wrong?