app/controllers/data_search_controller.rb
# Add an entry to the database recording the number of results and time of search operation
Add an entry to the database recording the number of results and time of search operation
Add an entry to the database recording the number of results and time of search operation
def log_data_search(options = {})
    if params[:attribute] || params[:taxon_concept_id]
      DataSearchLog.create(
        @data_search_file_options.merge({
          clade_was_ignored: false,
          user_id: ( logged_in? ? current_user.id : nil ),
          number_of_results: @results.total_entries,
          time_in_seconds: options[:time_in_seconds],
          ip_address: request.remote_ip
        })
      )
    end
  end
def log_data_search ( options = { } ) if params [ :attribute ] || params [ :taxon_concept_id ] DataSearchLog . create ( @data_search_file_options . merge ( { clade_was_ignored : false , user_id : ( logged_in? ? current_user . id : nil ) , number_of_results : @results . total_entries , time_in_seconds : options [ :time_in_seconds ] , ip_address : request . remote_ip } ) ) end end
Add an entry to the database recording the number of results and time of search operation
Add an entry to the database recording the number of results and time of search operation
# We are logging when there is only a TaxonConceptID - that will occur if a users clicks on a search # link from the data tab on a taxon page. In that case, a search is NOT performed, but we are # creating a log to capture the time it takes to populate the attribute list. # For every log which has an attribute, a search WILL have been performed
options
<not_specific>