All Questions
Tagged with acts-as-list ruby-on-rails-5
5
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
...
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 ...
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 ...
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
@...
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 ...