Skip to main content

All Questions

1 vote
1 answer
174 views

Is there a way to scope acts_as_list based on column in another table?

TLDR: Is there a way to scope acts_as_list into another table as such class SprintTodo < ApplicationRecord belongs_to :sprint belongs_to :todo acts_as_list scope: [:sprint, :todo.status] end ...
Sawaid's user avatar
  • 77
2 votes
1 answer
4k views

Rails gem acts_as_list: How to handle reordering of list items when a list item is destroyed?

I'm using acts_as_list v0.9.17 this way: class ListItem < ActiveRecord::Base acts_as_list scope: [:column1_id, :column2_id], :add_new_at => :bottom end When a new (scoped) @list_item is ...
Backo's user avatar
  • 18.7k
0 votes
1 answer
238 views

ordering a many_to_many relationship in rails

I would like to implement a drag and drop of a list of items in a playlist. Playlist contents are of different activerecord types. I need to store the position and persist it in the database and ...
Ayrad's user avatar
  • 4,006
1 vote
1 answer
77 views

Stack level too deep when calling remove_from_list from acts_as_list gem

I'm running a test that did not fail before upgrading to rails 5.0, but now I am getting stack level too deep, the test is as follows: describe "item hierarchy" do before(:each) do @...
marimaf's user avatar
  • 5,410
1 vote
2 answers
265 views

acts_as_list upper_limit on position

I am using acts_as_list on my model.I have a position column on that model for which I don't wan't the model object to be saved to the database if the position is more than my upper-limit.(I tried ...
Adil Hussain's user avatar