solidus_core 2.11.4 → 2.11.5

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of solidus_core might be problematic. Click here for more details.

Files changed (86) hide show
  1. checksums.yaml +4 -4
  2. data/app/models/spree/address.rb +28 -5
  3. data/app/models/spree/order_merger.rb +1 -1
  4. data/app/models/spree/payment.rb +10 -3
  5. data/app/models/spree/product.rb +8 -2
  6. data/app/models/spree/shipping_method.rb +1 -1
  7. data/app/models/spree/stock/availability_validator.rb +2 -2
  8. data/app/models/spree/stock/inventory_validator.rb +2 -2
  9. data/app/models/spree/taxon/active_storage_attachment.rb +1 -2
  10. data/app/models/spree/taxon/paperclip_attachment.rb +1 -0
  11. data/db/migrate/20210122110141_add_name_to_spree_addresses.rb +13 -0
  12. data/lib/generators/spree/dummy/templates/rails/test.rb +3 -0
  13. data/lib/spree/core.rb +0 -4
  14. data/lib/spree/core/engine.rb +6 -7
  15. data/lib/spree/core/version.rb +1 -1
  16. data/lib/spree/testing_support.rb +19 -28
  17. data/lib/spree/testing_support/dummy_app.rb +4 -2
  18. data/lib/spree/testing_support/dummy_app/mailer_previews/test_mailer_preview.rb +4 -0
  19. data/lib/spree/testing_support/factories.rb +8 -2
  20. data/lib/spree/testing_support/factories/address_factory.rb +6 -2
  21. data/lib/spree/testing_support/factories/adjustment_factory.rb +10 -2
  22. data/lib/spree/testing_support/factories/adjustment_reason_factory.rb +4 -2
  23. data/lib/spree/testing_support/factories/calculator_factory.rb +4 -2
  24. data/lib/spree/testing_support/factories/carton_factory.rb +7 -2
  25. data/lib/spree/testing_support/factories/country_factory.rb +4 -2
  26. data/lib/spree/testing_support/factories/credit_card_factory.rb +4 -2
  27. data/lib/spree/testing_support/factories/customer_return_factory.rb +8 -2
  28. data/lib/spree/testing_support/factories/image_factory.rb +4 -2
  29. data/lib/spree/testing_support/factories/inventory_unit_factory.rb +9 -2
  30. data/lib/spree/testing_support/factories/line_item_factory.rb +7 -2
  31. data/lib/spree/testing_support/factories/option_type_factory.rb +7 -2
  32. data/lib/spree/testing_support/factories/option_value_factory.rb +4 -2
  33. data/lib/spree/testing_support/factories/order_factory.rb +11 -2
  34. data/lib/spree/testing_support/factories/order_promotion_factory.rb +7 -2
  35. data/lib/spree/testing_support/factories/payment_factory.rb +9 -2
  36. data/lib/spree/testing_support/factories/payment_method_factory.rb +4 -2
  37. data/lib/spree/testing_support/factories/price_factory.rb +6 -2
  38. data/lib/spree/testing_support/factories/product_factory.rb +10 -2
  39. data/lib/spree/testing_support/factories/product_option_type_factory.rb +7 -2
  40. data/lib/spree/testing_support/factories/product_property_factory.rb +7 -2
  41. data/lib/spree/testing_support/factories/promotion_category_factory.rb +4 -2
  42. data/lib/spree/testing_support/factories/promotion_code_factory.rb +7 -2
  43. data/lib/spree/testing_support/factories/promotion_factory.rb +7 -2
  44. data/lib/spree/testing_support/factories/property_factory.rb +4 -2
  45. data/lib/spree/testing_support/factories/refund_factory.rb +7 -2
  46. data/lib/spree/testing_support/factories/refund_reason_factory.rb +4 -2
  47. data/lib/spree/testing_support/factories/reimbursement_factory.rb +6 -2
  48. data/lib/spree/testing_support/factories/reimbursement_type_factory.rb +4 -2
  49. data/lib/spree/testing_support/factories/return_authorization_factory.rb +8 -2
  50. data/lib/spree/testing_support/factories/return_item_factory.rb +8 -2
  51. data/lib/spree/testing_support/factories/return_reason_factory.rb +4 -2
  52. data/lib/spree/testing_support/factories/role_factory.rb +4 -2
  53. data/lib/spree/testing_support/factories/shipment_factory.rb +9 -2
  54. data/lib/spree/testing_support/factories/shipping_category_factory.rb +4 -2
  55. data/lib/spree/testing_support/factories/shipping_method_factory.rb +8 -2
  56. data/lib/spree/testing_support/factories/shipping_rate_factory.rb +7 -2
  57. data/lib/spree/testing_support/factories/state_factory.rb +7 -2
  58. data/lib/spree/testing_support/factories/stock_item_factory.rb +7 -2
  59. data/lib/spree/testing_support/factories/stock_location_factory.rb +8 -2
  60. data/lib/spree/testing_support/factories/stock_movement_factory.rb +6 -2
  61. data/lib/spree/testing_support/factories/stock_package_factory.rb +7 -2
  62. data/lib/spree/testing_support/factories/store_credit_category_factory.rb +4 -2
  63. data/lib/spree/testing_support/factories/store_credit_event_factory.rb +7 -2
  64. data/lib/spree/testing_support/factories/store_credit_factory.rb +8 -2
  65. data/lib/spree/testing_support/factories/store_credit_reason_factory.rb +4 -2
  66. data/lib/spree/testing_support/factories/store_credit_type_factory.rb +4 -2
  67. data/lib/spree/testing_support/factories/store_factory.rb +4 -2
  68. data/lib/spree/testing_support/factories/tax_category_factory.rb +7 -2
  69. data/lib/spree/testing_support/factories/tax_rate_factory.rb +8 -2
  70. data/lib/spree/testing_support/factories/taxon_factory.rb +6 -2
  71. data/lib/spree/testing_support/factories/taxonomy_factory.rb +4 -2
  72. data/lib/spree/testing_support/factories/user_factory.rb +8 -2
  73. data/lib/spree/testing_support/factories/variant_factory.rb +9 -2
  74. data/lib/spree/testing_support/factories/variant_property_rule_condition_factory.rb +7 -2
  75. data/lib/spree/testing_support/factories/variant_property_rule_factory.rb +8 -2
  76. data/lib/spree/testing_support/factories/variant_property_rule_value_factory.rb +7 -2
  77. data/lib/spree/testing_support/factories/zone_factory.rb +7 -2
  78. data/lib/spree/testing_support/factory_bot.rb +68 -0
  79. data/lib/spree/testing_support/order_walkthrough.rb +9 -9
  80. data/lib/spree/testing_support/sequences.rb +4 -1
  81. data/lib/tasks/migrations/migrate_address_names.rake +158 -0
  82. data/lib/tasks/migrations/migrate_default_billing_addresses_to_address_book.rake +38 -0
  83. data/lib/tasks/upgrade.rake +13 -0
  84. data/solidus_core.gemspec +23 -1
  85. metadata +30 -6
  86. data/lib/spree/awesome_nested_set_override.rb +0 -44
@@ -1,6 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'factory_bot'
3
+ require 'spree/testing_support/factory_bot'
4
+ Spree::TestingSupport::FactoryBot.when_cherry_picked do
5
+ Spree::TestingSupport::FactoryBot.deprecate_cherry_picking
6
+ end
4
7
 
5
8
  FactoryBot.define do
6
9
  sequence(:sku) { |n| "SKU-#{n}" }
@@ -0,0 +1,158 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'thor'
4
+
5
+ namespace :solidus do
6
+ namespace :migrations do
7
+ namespace :migrate_address_names do
8
+ desc 'Backfills Spree::Address name attribute using firstname and lastname
9
+ concatenation in order to retain historical data when upgrading to new
10
+ address name format'
11
+ task up: :environment do
12
+ puts "Combining addresses' firstname and lastname into name ... "
13
+ class Spree::AddressForMigration < ApplicationRecord
14
+ self.table_name = 'spree_addresses'
15
+ end
16
+
17
+ records = Spree::AddressForMigration.unscoped.where(name: [nil, ''])
18
+ count = records.count
19
+ connection = ActiveRecord::Base.connection
20
+ adapter_name = connection.adapter_name.downcase
21
+ shell = Thor::Shell::Basic.new
22
+ puts " Your DB contains #{count} addresses that may be affected by this task."
23
+ # `trim` is not needed for pg or mysql when using `concat_ws`:
24
+ # select concat_ws('joinstring', 'foo', null);
25
+ # concat_ws
26
+ # -----------
27
+ # foo
28
+ # (1 row)
29
+ # select concat_ws('joinstring', 'foo', null) = trim(concat_ws('joinstring', 'foo', null));
30
+ # ?column?
31
+ # ----------
32
+ # t
33
+ # (1 row)
34
+ unless count.zero?
35
+ concat_statement = begin
36
+ case adapter_name
37
+ when /sqlite/
38
+ "name = TRIM(COALESCE(firstname, '') || ' ' || COALESCE(lastname, ''))"
39
+ when /postgres/, /mysql2/
40
+ "name = CONCAT_WS(' ', firstname, lastname)"
41
+ else
42
+ abort " No migration path available for adapter #{adapter_name}. Please write your own."
43
+ end
44
+ end
45
+
46
+ # The batch size should be limited to avoid locking the table records for too long. These are
47
+ # the numbers I got with 1_000_000 records in `spree_addresses`, all with different name and
48
+ # surname, with postgresql:
49
+ #
50
+ # Updating 1000000 records in one shot
51
+ # batch took 178 seconds
52
+ #
53
+ # Updating 1000000 addresses in batches of 200000
54
+ # batch took 36 seconds
55
+ # batch took 31 seconds
56
+ # batch took 31 seconds
57
+ # batch took 31 seconds
58
+ # batch took 30 seconds
59
+ #
60
+ # Updating 1000000 addresses in batches of 150000
61
+ # batch took 29 seconds
62
+ # batch took 27 seconds
63
+ # batch took 27 seconds
64
+ # batch took 27 seconds
65
+ # batch took 26 seconds
66
+ # batch took 26 seconds
67
+ # batch took 19 seconds
68
+ #
69
+ # Updating 1000000 addresses in batches of 100000
70
+ # batch took 17 seconds
71
+ # batch took 15 seconds
72
+ # batch took 17 seconds
73
+ # batch took 17 seconds
74
+ # batch took 17 seconds
75
+ # batch took 17 seconds
76
+ # batch took 17 seconds
77
+ # batch took 17 seconds
78
+ # batch took 17 seconds
79
+ # batch took 17 seconds
80
+ #
81
+ # This is with mysql:
82
+ # Updating 1000000 records in one shot
83
+ # batch updated in 153 seconds
84
+ #
85
+ # Updating 1000000 records in batches of 200000, this may take a while...
86
+ # batch took 41 seconds
87
+ # batch took 37 seconds
88
+ # batch took 35 seconds
89
+ # batch took 28 seconds
90
+ # batch took 27 seconds
91
+ #
92
+ # Updating 1000000 records in batches of 150000, this may take a while...
93
+ # batch took 30 seconds
94
+ # batch took 29 seconds
95
+ # batch took 18 seconds
96
+ # batch took 18 seconds
97
+ # batch took 17 seconds
98
+ # batch took 29 seconds
99
+ # batch took 12 seconds
100
+ #
101
+ # Updating 1000000 records in batches of 100000, this may take a while...
102
+ # batch took 10 seconds
103
+ # batch took 11 seconds
104
+ # batch took 12 seconds
105
+ # batch took 13 seconds
106
+ # batch took 12 seconds
107
+ # batch took 12 seconds
108
+ # batch took 14 seconds
109
+ # batch took 19 seconds
110
+ # batch took 20 seconds
111
+ # batch took 21 seconds
112
+ #
113
+ # Please note that the migration will be much faster when there's no index
114
+ # on the `name` column. For example, with mysql each batch takes exactly
115
+ # the same time:
116
+ #
117
+ # Updating 1000000 records in batches of 200000, this may take a while...
118
+ # batch took 17 seconds
119
+ # batch took 17 seconds
120
+ # batch took 17 seconds
121
+ # batch took 16 seconds
122
+ # batch took 17 seconds
123
+ #
124
+ # So, if special need arise, one can drop the index added with migration
125
+ # 20210122110141_add_name_to_spree_addresses.rb and add the index later,
126
+ # in non blocking ways. For postgresql:
127
+ # add_index(:spree_addresses, :name, algorithm: :concurrently)
128
+ #
129
+ # For mysql 5.6:
130
+ # sql = "ALTER TABLE spree_addresses ADD INDEX index_spree_addresses_on_name (name), ALGORITHM=INPLACE, LOCK=NONE;"
131
+ # ActiveRecord::Base.connection.execute sql
132
+ #
133
+ puts ' Data migration will happen in batches. The default value is 100_000, which should take less than 20 seconds on mysql or postgresql.'
134
+ size = shell.ask(' Please enter a different batch size, or press return to confirm the default: ')
135
+ size = (size.presence || 100_000).to_i
136
+
137
+ abort " Invalid batch size number #{size}, please run the task again." unless size.positive?
138
+
139
+ batches_total = (count / size).ceil
140
+ puts " We're going to migrate #{count} records in #{batches_total} batches of #{size}."
141
+
142
+ answer = shell.ask(' Do you want to proceed?', limited_to: ['Y', 'N'], case_insensitive: true)
143
+ if answer == 'Y'
144
+ puts " Updating #{count} records in batches of #{size}, this may take a while..."
145
+
146
+ records.in_batches(of: size).each.with_index(1) do |batch, index|
147
+ now = Time.zone.now
148
+ batch.update_all(concat_statement)
149
+ puts " Batch #{index}/#{batches_total} done in #{(Time.zone.now - now).to_i} seconds."
150
+ end
151
+ else
152
+ puts " Database not migrated. Please, make sure to fill address's name field on your own."
153
+ end
154
+ end
155
+ end
156
+ end
157
+ end
158
+ end
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ namespace :solidus do
4
+ namespace :migrations do
5
+ namespace :migrate_default_billing_addresses_to_address_book do
6
+ task up: :environment do
7
+ print "Migrating default billing addresses to address book ... "
8
+ if Spree::UserAddress.where(default_billing: true).any?
9
+ Spree::LegacyUser.joins(:bill_address).update_all(bill_address_id: nil) # rubocop:disable Rails/SkipsModelValidations
10
+ end
11
+ adapter_type = Spree::Base.connection.adapter_name.downcase.to_sym
12
+ if adapter_type == :mysql2
13
+ sql = <<~SQL
14
+ UPDATE spree_user_addresses
15
+ JOIN spree_users ON spree_user_addresses.user_id = spree_users.id
16
+ AND spree_user_addresses.address_id = spree_users.bill_address_id
17
+ SET spree_user_addresses.default_billing = true
18
+ SQL
19
+ else
20
+ sql = <<~SQL
21
+ UPDATE spree_user_addresses
22
+ SET default_billing = true
23
+ FROM spree_users
24
+ WHERE spree_user_addresses.address_id = spree_users.bill_address_id
25
+ AND spree_user_addresses.user_id = spree_users.id;
26
+ SQL
27
+ end
28
+ Spree::Base.connection.execute sql
29
+ puts "Success"
30
+ end
31
+
32
+ task down: :environment do
33
+ Spree::UserAddress.update_all(default_billing: false) # rubocop:disable Rails/SkipsModelValidations
34
+ puts "Rolled back default billing address migration to address book"
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ namespace :solidus do
4
+ namespace :upgrade do
5
+ desc "Upgrade Solidus to version 2.11"
6
+ task two_point_eleven: [
7
+ 'solidus:migrations:migrate_default_billing_addresses_to_address_book:up',
8
+ 'solidus:migrations:migrate_address_names:up'
9
+ ] do
10
+ puts "Your Solidus install is ready for Solidus 2.11"
11
+ end
12
+ end
13
+ end
data/solidus_core.gemspec CHANGED
@@ -30,7 +30,7 @@ Gem::Specification.new do |s|
30
30
 
31
31
  s.add_dependency 'activemerchant', '~> 1.66'
32
32
  s.add_dependency 'acts_as_list', '< 2.0'
33
- s.add_dependency 'awesome_nested_set', '~> 3.2'
33
+ s.add_dependency 'awesome_nested_set', '~> 3.3'
34
34
  s.add_dependency 'cancancan', ['>= 2.2', '< 4.0']
35
35
  s.add_dependency 'carmen', '~> 1.1.0'
36
36
  s.add_dependency 'discard', '~> 1.0'
@@ -43,4 +43,26 @@ Gem::Specification.new do |s|
43
43
  s.add_dependency 'paranoia', '~> 2.4'
44
44
  s.add_dependency 'ransack', '~> 2.0'
45
45
  s.add_dependency 'state_machines-activerecord', '~> 0.6'
46
+
47
+ s.post_install_message = <<-MSG
48
+ -------------------------------------------------------------
49
+ Thank you for using Solidus
50
+ -------------------------------------------------------------
51
+ If this is a fresh install, don't forget to run the Solidus
52
+ installer with the following command:
53
+
54
+ $ bin/rails g solidus:install
55
+
56
+ If you are updating Solidus from an older version, please run
57
+ the following commands to complete the update:
58
+
59
+ $ bin/rails railties:install:migrations
60
+ $ bin/rails db:migrate
61
+ $ bin/rails solidus:upgrade:two_point_eleven
62
+
63
+ Please report any issues at:
64
+ - https://github.com/solidusio/solidus/issues
65
+ - http://slack.solidus.io/
66
+ -------------------------------------------------------------
67
+ MSG
46
68
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.4
4
+ version: 2.11.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-19 00:00:00.000000000 Z
11
+ date: 2021-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer
@@ -204,14 +204,14 @@ dependencies:
204
204
  requirements:
205
205
  - - "~>"
206
206
  - !ruby/object:Gem::Version
207
- version: '3.2'
207
+ version: '3.3'
208
208
  type: :runtime
209
209
  prerelease: false
210
210
  version_requirements: !ruby/object:Gem::Requirement
211
211
  requirements:
212
212
  - - "~>"
213
213
  - !ruby/object:Gem::Version
214
- version: '3.2'
214
+ version: '3.3'
215
215
  - !ruby/object:Gem::Dependency
216
216
  name: cancancan
217
217
  requirement: !ruby/object:Gem::Requirement
@@ -729,6 +729,7 @@ files:
729
729
  - db/migrate/20200320144521_add_default_billng_flag_to_user_addresses.rb
730
730
  - db/migrate/20200530111458_add_bcc_email_to_spree_stores.rb
731
731
  - db/migrate/20201008213609_add_discontinue_on_to_spree_products.rb
732
+ - db/migrate/20210122110141_add_name_to_spree_addresses.rb
732
733
  - db/seeds.rb
733
734
  - lib/generators/solidus/install/install_generator.rb
734
735
  - lib/generators/solidus/install/templates/config/initializers/spree.rb.tt
@@ -751,7 +752,6 @@ files:
751
752
  - lib/solidus/migrations/rename_gateways.rb
752
753
  - lib/solidus_core.rb
753
754
  - lib/spree/app_configuration.rb
754
- - lib/spree/awesome_nested_set_override.rb
755
755
  - lib/spree/config.rb
756
756
  - lib/spree/core.rb
757
757
  - lib/spree/core/active_merchant_dependencies.rb
@@ -851,6 +851,7 @@ files:
851
851
  - lib/spree/testing_support/dummy_app/assets/stylesheets/spree/backend/all.css
852
852
  - lib/spree/testing_support/dummy_app/assets/stylesheets/spree/frontend/all.css
853
853
  - lib/spree/testing_support/dummy_app/database.yml
854
+ - lib/spree/testing_support/dummy_app/mailer_previews/test_mailer_preview.rb
854
855
  - lib/spree/testing_support/dummy_app/migrations.rb
855
856
  - lib/spree/testing_support/dummy_app/rake_tasks.rb
856
857
  - lib/spree/testing_support/dummy_app/routes.rb
@@ -915,6 +916,7 @@ files:
915
916
  - lib/spree/testing_support/factories/variant_property_rule_factory.rb
916
917
  - lib/spree/testing_support/factories/variant_property_rule_value_factory.rb
917
918
  - lib/spree/testing_support/factories/zone_factory.rb
919
+ - lib/spree/testing_support/factory_bot.rb
918
920
  - lib/spree/testing_support/fixtures/blank.jpg
919
921
  - lib/spree/testing_support/flash.rb
920
922
  - lib/spree/testing_support/job_helpers.rb
@@ -932,10 +934,13 @@ files:
932
934
  - lib/tasks/core.rake
933
935
  - lib/tasks/email.rake
934
936
  - lib/tasks/migrations/copy_order_bill_address_to_credit_card.rake
937
+ - lib/tasks/migrations/migrate_address_names.rake
938
+ - lib/tasks/migrations/migrate_default_billing_addresses_to_address_book.rake
935
939
  - lib/tasks/migrations/migrate_shipping_rate_taxes.rake
936
940
  - lib/tasks/migrations/migrate_user_addresses.rake
937
941
  - lib/tasks/migrations/rename_gateways.rake
938
942
  - lib/tasks/order_capturing.rake
943
+ - lib/tasks/upgrade.rake
939
944
  - solidus_core.gemspec
940
945
  - vendor/assets/javascripts/jquery.payment.js
941
946
  - vendor/assets/javascripts/jsuri.js
@@ -944,7 +949,26 @@ homepage: http://solidus.io
944
949
  licenses:
945
950
  - BSD-3-Clause
946
951
  metadata: {}
947
- post_install_message:
952
+ post_install_message: |
953
+ -------------------------------------------------------------
954
+ Thank you for using Solidus
955
+ -------------------------------------------------------------
956
+ If this is a fresh install, don't forget to run the Solidus
957
+ installer with the following command:
958
+
959
+ $ bin/rails g solidus:install
960
+
961
+ If you are updating Solidus from an older version, please run
962
+ the following commands to complete the update:
963
+
964
+ $ bin/rails railties:install:migrations
965
+ $ bin/rails db:migrate
966
+ $ bin/rails solidus:upgrade:two_point_eleven
967
+
968
+ Please report any issues at:
969
+ - https://github.com/solidusio/solidus/issues
970
+ - http://slack.solidus.io/
971
+ -------------------------------------------------------------
948
972
  rdoc_options: []
949
973
  require_paths:
950
974
  - lib
@@ -1,44 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module AwesomeNestedSetOvveride
4
- # Add :polimorphic key option only when used to make it work with Rails 6.1+,
5
- # required since rails/rails@2c008d9
6
- # This can be removed when upgrading to an awesome_nested_set version
7
- # compliant with Rails 6.1+, already addressed in
8
- # collectiveidea/awesome_nested_set#421
9
- module RelateParent
10
- def acts_as_nested_set_relate_parent!
11
- # Disable Rubocop to keep original code for diffs
12
- # rubocop:disable
13
- options = {
14
- :class_name => self.base_class.to_s,
15
- :foreign_key => parent_column_name,
16
- :primary_key => primary_column_name,
17
- :counter_cache => acts_as_nested_set_options[:counter_cache],
18
- :inverse_of => (:children unless acts_as_nested_set_options[:polymorphic]),
19
- :touch => acts_as_nested_set_options[:touch]
20
- }
21
- options[:polymorphic] = true if acts_as_nested_set_options[:polymorphic]
22
- options[:optional] = true if ActiveRecord::VERSION::MAJOR >= 5
23
- belongs_to :parent, options
24
- # rubocop:enable
25
- end
26
-
27
- CollectiveIdea::Acts::NestedSet.prepend self
28
- end
29
-
30
- # Skip breaking model reload before update depth. Already addressed in
31
- # collectiveidea/awesome_nested_set#413
32
- # This can be removed when a new version of awesome_nested_set is released.
33
- module Model
34
- def set_depth!
35
- return unless has_depth_column?
36
-
37
- in_tenacious_transaction do
38
- update_depth(level)
39
- end
40
- end
41
-
42
- CollectiveIdea::Acts::NestedSet::Model.prepend self
43
- end
44
- end