lib/sem4r/ad_param/ad_param.rb in sem4r-0.1.1 vs lib/sem4r/ad_param/ad_param.rb in sem4r-0.1.2

- old
+ new

@@ -70,16 +70,16 @@ t.paramIndex @index end end def self.from_element(ad_group, el) - criterion_id = el.elements["criterionId"].text.strip.to_i + criterion_id = el.at_xpath("criterionId").text.strip.to_i criterion = ad_group.find_criterion(criterion_id) new(ad_group, criterion) do # ad_param don't have id so use @saved to indicate if readed from xml @saved = true - index el.elements["paramIndex"].text.strip.to_i - text el.elements["insertionText"].text.strip + index el.at_xpath("paramIndex").text.strip.to_i + text el.at_xpath("insertionText").text.strip end end def save return if @saved