lib/daengine/content_service_processor.rb in daengine-0.2.11 vs lib/daengine/content_service_processor.rb in daengine-0.2.12

- old
+ new

@@ -6,17 +6,18 @@ platform =~ /mswin/ || platform =~ /mingw/ end 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.attributes[:samiCode] - da.orderable = c.attributes[:orderable] + da.orderable = c.attributes[:orderable] == 'true' da.save! break end end end \ No newline at end of file