acts_as_list
acts_as_list copied to clipboard
An ActiveRecord plugin for managing lists.
Hello, I'm on the latest version on Rails 5.2. I have to save 2 times to remove the gap ``` @cover.items Cover::Item Load (0.6ms) SELECT "cover_items".* FROM "cover_items" WHERE "cover_items"."cover_id"...
In order to fight against the duplicated position issue the document suggests to add position uniqueness index. However this constraint forbids the position being updated. Positions are adjusted in the...
Hi, I am getting the following error: ``` 13:24:39 jobs.1 | 2022-04-09T12:24:39.428Z pid=35399 tid=25bz WARN: ArgumentError: position cannot be lower than top 13:24:39 jobs.1 | 2022-04-09T12:24:39.428Z pid=35399 tid=25bz WARN: /Users/user/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/acts_as_list-1.0.4/lib/acts_as_list/active_record/acts/list.rb:392:in...
Example: ```ruby class Category < ActiveRecord::Base acts_as_list belongs_to :account has_many :templates, dependent: :nullify validates :name, presence: true validates :position, numericality: { only_integer: true, greater_than_or_equal_to: 0 } end ``` It gives:...
Background: ------------------ Executing `connection.data_source_exists?` or `connection.table_exists?` will fire `SHOW TABLES LIKE 'table_name'` query. When this is invoked n times, then n number of show table queries will be fired. Enhancement:...
This wasn't clear from the documentation. I have some items that belongs to two separate lists. Within list A, one item can be on the second position, but within list...
I'm running into an issue where acts_as_list is attempting to re-order every single item that isn't associated with the scope. For example, we have a bunch of images that are...
```ruby require "bundler/inline" gemfile(true) do source "https://rubygems.org" gem 'activerecord', "6.1.1" gem 'sqlite3' gem 'mocha' gem 'acts_as_list' end require "active_record" require "minitest/autorun" require 'mocha/minitest' require "logger" ActiveRecord::Base.establish_connection(adapter: "sqlite3", database: ":memory:") ActiveRecord::Base.logger...
We seem to intermittently get Deadlock errors with `acts_as_list` and Postgres. ``` PG::TRDeadlockDetected: ERROR: deadlock detected DETAIL: Process 18092 waits for ShareLock on transaction 53198930; blocked by process 30411. Process...
move_higher and move_lower do not respect sequential_updates=true move_higher method: https://github.com/brendon/acts_as_list/blob/eb972421e2b9db70b3993b13a958f57c89b0e6b0/lib/acts_as_list/active_record/acts/list.rb#L98 Most of the methods in `list.rb` end up calling `insert_at_position` eventually, which will eventually check `sequential_updates?` and behave accordingly. Not...