app/controllers/datasets_controller.rb
# given a dataset, update its last_access timestamp to the current date/time and increment the number_of_downloads field
given a dataset, update its last_access timestamp to the current date/time and increment the number_of_downloads field
given a dataset update its last_access timestamp to the current date / time and increment the number_of_downloads field
def log_download(dataset)
    if !browser.bot? then
      dataset.last_access = Time.now.iso8601
      dataset.number_of_downloads = dataset.number_of_downloads.to_i + 1
      dataset.save
    end
  end
def log_download ( dataset ) if ! browser . bot? then dataset . last_access = Time . now . iso8601 dataset . number_of_downloads = dataset . number_of_downloads . to_i + 1 dataset . save end end
given a dataset, update its last_access timestamp to the current date/time and increment the number_of_downloads field
given a dataset update its last_access timestamp to the current date / time and increment the number_of_downloads field
# only log if the user is a human, not a bot (e.g. googlebot) - uses the 'browser' gem
dataset
<not_specific>