On 1 Jan 2013, at 00:29, Barry Paul <notifications@github.com> wrote:

> In lib/meta_pairs/meta_pair_object.rb:
> 
> > @@ -41,9 +41,17 @@ def get_keys
> >      module HasInstanceMethods
> >        def get_value(key, owner=nil)
> >          if owner.present?
> > -          mp = meta_pairs.owned_by(owner).find_by_key(key)
> > +          if meta_pairs.loaded?
> > +            mp = meta_pairs.detect{ |mp| mp.owner_id == owner.id && mp.owner_type = owner.class.base_class.name && mp.key == key }
> Would mp.owner == owner not work here? Seems like Rails should take care of the polymorphic type for us.
> 
It would, but in doing so it goes to the database to get the object, which is what I was trying to avoid.
> —
> Reply to this email directly or view it on GitHub.
> 
>