Sha256: 8c609f56d5575ed3b4f2309b40ed8301e9ca1f9724040d3f2f730f8d7c5583ff
Contents?: true
Size: 564 Bytes
Versions: 16
Compression:
Stored size: 564 Bytes
Contents
# frozen_string_literal: true module Lcms module Engine class GenerateHierarchicalPositions def initialize(queryset = nil) @queryset = queryset || Resource.all end def generate! puts "====> Generating Resource hierarchical positions\n" @queryset.each do |res| # obs: were we want a simple sql update statement, without rails callbacks res.update_columns hierarchical_position: HierarchicalPosition.new(res).position print '.' end puts "\n" end end end end
Version data entries
16 entries across 16 versions & 1 rubygems