#612 suggestion
Lawrence Pit

dm-is-remixable: allow belongs_to

Reported by Lawrence Pit | October 24th, 2008 @ 06:36 AM

dm-is-remixable does not allow belong_to relations (and I guess, but haven't tested, neither has-1/n relations). Is that by design?

Workaround is to use enhance at the places where you remix the remixable, but that is quite repetitive.

Comments and changes to this ticket

  • Dan Kubb (dkubb)

    Dan Kubb (dkubb) January 8th, 2009 @ 02:19 PM

    • State changed from “new” to “unconfirmed”
    • Assigned user cleared.
  • coryodaniel

    coryodaniel January 11th, 2009 @ 10:32 PM

    • Tag set to associations, dm-is-remixable

    Its because #belongs_to and #has are class methods, so when you do belongs_to :my_obj your calling that on that particular module.

    Should remixable define its own belongs_to and has that it calls on anything that remixes it?

  • Michael Klishin (antares)

    Michael Klishin (antares) January 13th, 2009 @ 05:13 AM

    • State changed from “unconfirmed” to “accepted”
    • Assigned user set to “Michael Klishin (antares)”

    I think I have a better idea: I have a class called deferred module that allows you use any class methods on hosting class since body of module is evaluated only on inclusion. I will port it to Extlib shortly.

  • Michael Klishin (antares)

    Michael Klishin (antares) March 25th, 2009 @ 11:59 PM

    • State changed from “accepted” to “confirmed”
  • Martin Gamsjaeger (snusnu)

    Martin Gamsjaeger (snusnu) July 9th, 2009 @ 05:52 PM

    • Assigned user changed from “Michael Klishin (antares)” to “Martin Gamsjaeger (snusnu)”
    • State changed from “confirmed” to “accepted”

    I will start working on a "new" dm-is-remixable pretty soon. Ted Han and I both want to make the API more "has" like, and will definitely have a look at incorporating extlib/lazy_module to allow for association definitions right inside the remixable module.

  • Martin Gamsjaeger (snusnu)

    Martin Gamsjaeger (snusnu) March 30th, 2010 @ 06:09 PM

    • State changed from “accepted” to “suggestion”

    In the meantime I've started work on my dm-is-remixable implementation but I got sidetracked and so things currently aren't totally useable atm. I'm marking this as a suggestion for now to remind me that the new version should support this, but to not stand in the way of open tickets. I don't think that feature request will ever make it into the current implementation of dm-is-remixable (unless someone else is willing to provide it).

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Pages