- if @rows && !@rows.empty?
  %h3 Data
  %p
    .btn-group
      = link_to "Download table (as CSV)", scraper_data_path(@scraper, :format => :csv), class: "btn btn-default"
      = link_to "Download SQLite database", scraper_data_path(@scraper, :format => :sqlite), class: "btn btn-default"
      = link_to "Use the API", api_path, class: "btn btn-default"
  %p rows #{[10, @scraper.database.no_rows].min} / #{@scraper.database.no_rows} (#{number_to_human_size @scraper.database.sqlite_db_size})
  .table-responsive.scraper-data
    %table.table.table-striped.table-bordered.table-condensed
      %tr
        - @rows.first.each_key do |field|
          %th= field
      - @rows.each do |row|
        %tr
          - row.each_value do |v|
            %td
              %div.has-popover{data: {toggle: "popover", placement: "bottom", trigger: "hover", content: v, container: "body"}}
                = auto_link(v)

- if @rows && !@rows.empty?
  %h3 Data
  %p
    .btn-group
      = link_to "Download table (as CSV)", scraper_data_path(@scraper, :format => :csv), class: "btn btn-default"
      = link_to "Download SQLite database", scraper_data_path(@scraper, :format => :sqlite), class: "btn btn-default"
      = link_to "Use the API", api_path, class: "btn btn-default"
  %p rows #{[10, @scraper.database.no_rows].min} / #{@scraper.database.no_rows} (#{number_to_human_size @scraper.database.sqlite_db_size})
  .table-responsive.scraper-data
    %table.table.table-striped.table-bordered.table-condensed
      %tr
        - @rows.first.each_key do |field|
          %th= field
      - @rows.each do |row|
        %tr
          - row.each_value do |v|
            %td
              %div.has-popover{data: {toggle: "popover", placement: "bottom", trigger: "hover", content: v, container: "body"}}
                = auto_link(v.to_s)

Convert to string before trying to auto_link
Convert to string before trying to auto_link
