On Oct 20, 12:35 am, Raymond O'Connor <rails-mailing-l...@andreas-
s.net> wrote:
> Is there a way to tell if an association on an object is cached without
> hitting the db?
>
> For example, let's say I have order has_many line_items, is there a way
> for me to tell if order.line_items is already populated?

I think you can do order.line_items.loaded?

Fred
> --
> Posted viahttp://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to