<commit_before># frozen_string_literal: true

# see observations_controller.rb
module ObservationsController::Show
  # Display observation and related namings, comments, votes, images, etc.
  # This should be a redirection, not rendered, due to large number of
  # @variables that need to be set up for the view.  Lots of views are used:
  #   observations/show
  #   _show_observation
  #   _show_images
  #   _show_namings
  #   _show_comments
  #   _show_footer
  # Linked from countless views as a fall-back.
  # Inputs: params[:id]
  # Outputs:
  #   @observation
  #   @canonical_url
  #   @mappable
  #   @new_sites
  #   @votes
  def show
    pass_query_params
    store_location
    case params[:flow]
    when "next"
      redirect_to_next_object(:next, Observation, id) and return
    when "prev"
      redirect_to_next_object(:prev, Observation, id) and return
    end

    check_if_user_wants_to_make_their_votes_public
    check_if_user_wants_to_change_thumbnail_size<commit_msg>Fix id param in show<commit_after># frozen_string_literal: true

# see observations_controller.rb
module ObservationsController::Show
  # Display observation and related namings, comments, votes, images, etc.
  # This should be a redirection, not rendered, due to large number of
  # @variables that need to be set up for the view.  Lots of views are used:
  #   observations/show
  #   _show_observation
  #   _show_images
  #   _show_namings
  #   _show_comments
  #   _show_footer
  # Linked from countless views as a fall-back.
  # Inputs: params[:id]
  # Outputs:
  #   @observation
  #   @canonical_url
  #   @mappable
  #   @new_sites
  #   @votes
  def show
    pass_query_params
    store_location
    case params[:flow]
    when "next"
      redirect_to_next_object(:next, Observation, params[:id]) and return
    when "prev"
      redirect_to_next_object(:prev, Observation, params[:id]) and return
    end

    check_if_user_wants_to_make_their_votes_public
    check_if_user_wants_to_change_thumbnail_size
{'fraction_non_alphanumeric': 0.06862257583291895, 'fraction_numerical': 0.0, 'mean_word_length': 3.6252873563218393, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3946633', 'n_tokens_mistral': 663, 'n_tokens_neox': 656, 'n_words': 177}