#1307 ✓resolved
dxg

dm-is-list broken in latest commit 1.0.0rc3

Reported by dxg | June 7th, 2010 @ 07:21 AM

This commit seems to have broken dm-is-list:
http://github.com/datamapper/dm-is-list/commit/c9a80897bf03ffa35cef...
It causes list enchanced models not to validate with:
"Position must not be blank" The minimum value appears not to get set.

Reverting makes the problem go away.

Comments and changes to this ticket

  • Dan Kubb (dkubb)

    Dan Kubb (dkubb) June 7th, 2010 @ 04:39 PM

    • State changed from “new” to “unconfirmed”

    @dxg: The position is supposed to be set on all objects with dm-is-list. It should be set automatically when saving the object.

    Can you supply a stand-alone script that demonstrates a use case where this is not true?

  • dxg

    dxg June 7th, 2010 @ 09:58 PM

    As requested:
    http://gist.github.com/429539
    Fails for me with error as described above.

  • Piotr Solnica (solnic)

    Piotr Solnica (solnic) June 8th, 2010 @ 03:25 AM

    • State changed from “unconfirmed” to “confirmed”

    I believe it's because validations are fired before the dm-is-list kicks in with its hooks. We could fix it by doing before :valid? if dm-validations are included and default to before :create/:update if they're not, kinda ugly IMO but that's the best thing we can do now.

  • Piotr Solnica (solnic)

    Piotr Solnica (solnic) March 24th, 2011 @ 06:03 AM

    • State changed from “confirmed” to “resolved”
    • Milestone order changed from “0” to “0”

    It's fixed, checked with DM 1.1.0

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