Brendon Muir

Results 265 comments of Brendon Muir

Hi @oyeanuj, `acts_as_list` treats the position column as a literal position value (rather than the position in the list), though those two things could be the same, and ideally they...

That's correct. As far as I know, there's no built in method to do this.

Thanks @dgimb89, that's true regarding explicit positions. Something that may help is the `destroyed_by_association` method that you can use to determine if something is being destroyed by a cascade.

Hi @bzwei, I'm not sure I understand you. Are you able to raise a PR with a failing test case to show the problem? :)

Thanks @bzwei, can you show me the code you use to update the position?

I see your point. Unfortunately I'm not in much of a position to fix this quickly but am definitely happy to help you by reviewing a PR if you'd like...

Hi @ericpowell03, you're probably right there. I'd be happy to merge a documentation PR for you. Changing when the re-arranging happens would be a bigger (probably breaking) change. To be...

Hi @martinstreicher, sadly I'm not sure there's an easy answer to having a unique constraint on the position column. There is a mode you can go into called `sequential_updates`. With...

I don't think the `DEFERRABLE` trick works on MySQL last I checked? Could be wrong. I recently rolled my own list maintenance concern that you can see here: https://gist.github.com/brendon/d6cfd60cb5e70dc77a15a2476f04d279 I...

Hi @rctneil, it'll insert at whatever `album_gi.position` is. Not knowing much about the structure of your code I can't really help more. The first step would be to figure out...