lib/alchemy/upgrader/tasks/cells_upgrader.rb in alchemy_cms-4.3.0 vs lib/alchemy/upgrader/tasks/cells_upgrader.rb in alchemy_cms-4.3.1
- old
+ new
@@ -127,9 +127,10 @@
def update_render_cell_calls
puts "-- Update render_cell calls"
Dir.glob("#{alchemy_views_folder}/**/*").each do |view|
next if File.directory?(view)
gsub_file(view, /render_cell[\(\s]?([:'"]?[a-z_]+['"]?)\)?/, 'render_elements(only: \1, fixed: true)')
+ gsub_file(view, /render_elements[\(\s](.*):?from_cell:?\s?(=>)?\s?(['"][a-z_]+['"])\)?/, 'render_elements(\1only: \3, fixed: true)')
end
end
def elements_view_folder
Rails.root.join('app', 'views', 'alchemy', 'elements')