forked from fixin.me/fixin.me
Remove awesome_nested_set gem dependency
This commit is contained in:
parent
651534134e
commit
11ecd8eaed
2
Gemfile
2
Gemfile
@ -10,8 +10,6 @@ gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
|
|||||||
|
|
||||||
gem "devise"
|
gem "devise"
|
||||||
|
|
||||||
gem 'awesome_nested_set'
|
|
||||||
|
|
||||||
gem 'importmap-rails', '~> 1.2.3'
|
gem 'importmap-rails', '~> 1.2.3'
|
||||||
# turborails >= 2.0.0 required with npm v8.0.0 with support for [autofocus]
|
# turborails >= 2.0.0 required with npm v8.0.0 with support for [autofocus]
|
||||||
# attribute in turbo-streams
|
# attribute in turbo-streams
|
||||||
|
@ -77,8 +77,6 @@ GEM
|
|||||||
tzinfo (~> 2.0)
|
tzinfo (~> 2.0)
|
||||||
addressable (2.8.6)
|
addressable (2.8.6)
|
||||||
public_suffix (>= 2.0.2, < 6.0)
|
public_suffix (>= 2.0.2, < 6.0)
|
||||||
awesome_nested_set (3.6.0)
|
|
||||||
activerecord (>= 4.0.0, < 7.2)
|
|
||||||
base64 (0.2.0)
|
base64 (0.2.0)
|
||||||
bcrypt (3.1.20)
|
bcrypt (3.1.20)
|
||||||
bigdecimal (3.1.5)
|
bigdecimal (3.1.5)
|
||||||
@ -251,7 +249,6 @@ PLATFORMS
|
|||||||
x86_64-linux
|
x86_64-linux
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
awesome_nested_set
|
|
||||||
byebug
|
byebug
|
||||||
capybara
|
capybara
|
||||||
devise
|
devise
|
||||||
|
@ -11,9 +11,6 @@ class Unit < ApplicationRecord
|
|||||||
errors.add(:base, :multilevel_nesting)
|
errors.add(:base, :multilevel_nesting)
|
||||||
end
|
end
|
||||||
|
|
||||||
acts_as_nested_set parent_column: :base_id, scope: :user, dependent: :destroy,
|
|
||||||
order_column: :multiplier
|
|
||||||
|
|
||||||
scope :defaults, ->{ where(user: nil) }
|
scope :defaults, ->{ where(user: nil) }
|
||||||
scope :ordered, ->{
|
scope :ordered, ->{
|
||||||
parent_symbol = Arel::Nodes::NamedFunction.new(
|
parent_symbol = Arel::Nodes::NamedFunction.new(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user