Skip to content

Commit

Permalink
cast empty strings to nils at import
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewcarpenter committed Nov 19, 2014
1 parent 5f9e3e8 commit 4347736
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -63,6 +63,11 @@ def pdf_url?
private

def simple_node_value(css_selector)
node.css(css_selector).first.try(:content)
content = node.css(css_selector).first.try(:content)
if content.blank?
nil
else
content
end
end
end

0 comments on commit 4347736

Please sign in to comment.