Replies: 2 comments 9 replies
-
Hi @rossme, that's an interesting one. This has come up before in a more boolean kind of way where someone wanted to only order things where something was like In positioning, everything boils down to SQL queries for a scope so I'm wondering how we could achieve this in your example. Perhaps you could have a method called I'll have a look and see if this is straightforward to implement in positioning. I don't think it'd be too hard. It's essentially a boolean column with a custom definition for what's true. You'd still get items that aren't those types being positioned because in positioning everything is positioned but you could just ignore those positions. Let me ponder, and if you feel like having a crack at it, please go ahead by all means :D |
Beta Was this translation helpful? Give feedback.
-
As a side note, I needed to do something like this and ended up using a virtual column: t.virtual "absolute_section_id", type: :bigint, as: "coalesce(`section_id`,0)", stored: true I sometimes had articles belonging to sections but also there were lead articles that weren't in a section so they had a |
Beta Was this translation helpful? Give feedback.
-
Hi @brendon, I've been using
acts_as_list
using a scope similar to this one below:As you know, this ensures that the position order is updated if the item type is included in
TYPES
. When I looked at Positioning, it wasn't clear to me that this functionality is supported, at least from a brief review ofPositioning::Behaviour
. Any idea if it already is (and I completely missed it) or if it will be in a future release of Positioning?Thanks
Beta Was this translation helpful? Give feedback.
All reactions