Fwd: nested_has_many_through with has_many_polymorphs associations?

0 views
Skip to first unread message

Ian White

unread,
May 1, 2008, 6:07:17 AM5/1/08
to nested_has_...@googlegroups.com
---------- Forwarded message ----------
From: Jörg Battermann <j...@joergbattermann.com>
Date: 2008/4/29
Subject: nested_has_many_through with has_many_polymorphs associations?
To: ian.w...@gmail.com


Ian,

quick Q regarding your so far awesome plugin: I have a user model
which has many 'items', which is basically a h_m_polymorphs
association to all sorts of models (e.g. images, texts, etc)

now, every user also has related users via a relationship model and
therefore has an overall .relationships association and many :through
=> :relationships subsets thereof (e.g .friends , .colleagues, ...).


Now what I'd like to get is all polymorphic .items of all related
users of one particular user. I gave it a try all evening but somehow
it didn't work :( Did you ever give that combination a try?

Cheers and greetings from Germany,
-J


--
Argument from Design--We build web applications
Western House 239 Western Road Sheffield S10 1LE UK
Mobile: +44 (0)797 4678409 | Office: +44 (0)114 2667712
<http://www.ardes.com/> | <http://blog.ardes.com/ian>

Ian White

unread,
May 1, 2008, 6:07:42 AM5/1/08
to nested_has_...@googlegroups.com
---------- Forwarded message ----------
From: Ian White <ian.w...@gmail.com>
Date: 2008/4/30
Subject: Re: nested_has_many_through with has_many_polymorphs associations?
To: Jörg Battermann <j...@joergbattermann.com>


Hi Jörg,


> Now what I'd like to get is all polymorphic .items of all related users of
> one particular user. I gave it a try all evening but somehow it didn't work
> :( Did you ever give that combination a try?

Not yet, the plugin is in its infancy though - you're more than
welcome to fork, and add some specs for the cases you;re after - then
we can see exactly where it's falling down.

Cheers,
Ian

Ian White

unread,
May 1, 2008, 6:07:54 AM5/1/08
to nested_has_...@googlegroups.com
---------- Forwarded message ----------
From: Jörg Battermann <j...@joergbattermann.com>
Date: 2008/5/1
Subject: Re: nested_has_many_through with has_many_polymorphs associations?
To: Ian White <ian.w...@gmail.com>


Morning Ian,

will do over the weekend most likely, the specing out :) However, one
thing I noticed with the current version is problems with
will_paginate:

http://groups.google.com/group/will_paginate/browse_thread/thread/1ec4603a09704001

Basically I have hmp, will_paginate and had n_h_m_t installed
together, and wp's pagination worked just fine without nhmt installed,
installing it broke the .paginate method on collections :(

-j

Jörg Battermann

unread,
May 1, 2008, 6:39:12 AM5/1/08
to nested_has_many_through
I hereby declare everything I've said for nullified, invalid and
lie! ;) Read: I've re-added the plugin and get no exception anymore.
Doublechecked the log of the past commit, and I only changed my apps'
readme beside removing nhmt.... so I am kinda confused.

I'll keep an eye on it and when/if I stumble upon that again, I'll
post the stacktrace up here. For the time being I crawl back into my
cave and feel bad for blaming nhmt ;)

Thanks Ian,
-J


On May 1, 12:07 pm, "Ian White" <ian.w.wh...@gmail.com> wrote:
> ---------- Forwarded message ----------
> From: Jörg Battermann <j...@joergbattermann.com>
> Date: 2008/5/1
> Subject: Re: nested_has_many_through with has_many_polymorphs associations?
> To: Ian White <ian.w.wh...@gmail.com>
>
> Morning Ian,
>
>  will do over the weekend most likely, the specing out :) However, one
> thing I noticed with the current version is problems with
> will_paginate:
>
>  http://groups.google.com/group/will_paginate/browse_thread/thread/1ec...
>
>  Basically I have hmp, will_paginate and had n_h_m_t installed
> together, and wp's pagination worked just fine without nhmt installed,
> installing it broke the .paginate method on collections :(
>
>  -j
>
>  On Apr 30, 2008, at 1:02 PM, Ian White wrote:
>
> > Hi Jörg,
>
> > > Now what I'd like to get is all polymorphic .items of all related users of
> > > one particular user. I gave it a try all evening but somehow it didn't work
> > > :( Did you ever give that combination a try?
>
> > Not yet, the plugin is in its infancy though - you're more than
> > welcome to fork, and add some specs for the cases you;re after - then
> > we can see exactly where it's falling down.
>
> > Cheers,
> > Ian
>
> > --
> > Argument from Design--We build web applications
> > Western House 239 Western Road Sheffield S10 1LE UK
> > Mobile: +44 (0)797 4678409 | Office: +44 (0)114 2667712
> > <http://www.ardes.com/> | <http://blog.ardes.com/ian>
>
> --
> Argument from Design--We build web applications
> Western House 239 Western Road Sheffield S10 1LE UK
> Mobile: +44 (0)797 4678409 | Office: +44 (0)114 2667712
> <http://www.ardes.com/> | <http://blog.ardes.com/ian>
>
>
>
>  smime.p7s
> 3KDownload

Ian White

unread,
May 1, 2008, 6:55:15 AM5/1/08
to nested_has_...@googlegroups.com
Hi Jörg,

> For the time being I crawl back into my
> cave and feel bad for blaming nhmt ;)

:)

> I'll keep an eye on it and when/if I stumble upon that again, I'll
> post the stacktrace up here.

Great.

Reply all
Reply to author
Forward
0 new messages