Class: Alchemy::Upgrader::Tasks::NestableElementsMigration
- Inherits:
-
Object
- Object
- Alchemy::Upgrader::Tasks::NestableElementsMigration
- Defined in:
- lib/alchemy/upgrader/tasks/nestable_elements_migration.rb
Instance Method Summary collapse
Instance Method Details
#migrate_existing_elements ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/alchemy/upgrader/tasks/nestable_elements_migration.rb', line 3 def migrate_existing_elements elements_with_nestable_elements = Alchemy::Element.all.select do |e| e.definition['nestable_elements'] end if elements_with_nestable_elements.present? elements_with_nestable_elements.each do |el| migrate_element(el) end else puts "No elements with `nestable_elements` found. Skip" end end |