Association : client.order , ok but how do you retrieve the client from the order ?

Posted by Sylario on Stack Overflow See other posts from Stack Overflow or by Sylario
Published on 2010-05-27T15:39:36Z Indexed on 2010/05/27 15:41 UTC
Read the original article Hit count: 264

Filed under:

I have read the following rails guide : http://guides.rails.info/active_record_querying.html

in there exemple a client has many orders and orders belong to clients.

They explain how to find a lot of stuff from client. But if i want all orders from yesterday, with the corresponding client name, how do i retrieve the client from an order?

© Stack Overflow or respective owner

Related posts about ruby-on-rails