Sha256: a6d869635204e460f4d8d13af75af957170d4903daf41ff8096d7da93eacb2e2

Contents?: true

Size: 578 Bytes

Versions: 9

Compression:

Stored size: 578 Bytes

Contents

module Daengine
  class ContentServiceProcessor

    def self.process_orderable
      result = DigitalAsset.all
      ContentServiceResource.site = Daengine.config[:content_service_url] # for some reason this doesn't work from the class itself
      cs = ContentServiceResource.find_all
      result.each{ |da| set_orderable(da,cs)}
    end

    def self.set_orderable(da,cs)
      cs.each do |c| 
        if da.sami_code == c.samiCode 
          da.orderable = c.orderable == 'true'
          da.save!
          break
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
daengine-0.3.7.5 lib/daengine/content_service_processor.rb
daengine-0.3.7.4 lib/daengine/content_service_processor.rb
daengine-0.3.7.3 lib/daengine/content_service_processor.rb
daengine-0.3.7.2 lib/daengine/content_service_processor.rb
daengine-0.3.7.1 lib/daengine/content_service_processor.rb
daengine-0.3.7 lib/daengine/content_service_processor.rb
daengine-0.3.5 lib/daengine/content_service_processor.rb
daengine-0.3.4 lib/daengine/content_service_processor.rb
daengine-0.3.3 lib/daengine/content_service_processor.rb