<commit_before>module PlacesHelper
  def format_places_field(place, field)
    case field
    when "name" then place.long_name + ((sn = place.short_name).blank? ? "" : " (#{sn})")
    when "type" then (pt = place.place_type) ? pt.name : ""
    when "latitude" then (lat = place.latitude).nil? ? "" : lat.round(6)
    when "longitude" then (lng = place.longitude).nil? ? "" : lng.round(6)
    when "container" then (pc = place.container) ? pc.full_name : ""
    when "actions"
      link_to("Edit", edit_place_path(place)) + " | " +
        link_to("Delete", place, :method => :delete, :confirm => "Are you sure you want to delete #{place.full_name}?")
    else place.send(field)
    end
  end
end<commit_msg>fixed permissions for place index table links.<commit_after>module PlacesHelper
  def format_places_field(place, field)
    case field
    when "name" then place.long_name + ((sn = place.short_name).blank? ? "" : " (#{sn})")
    when "type" then (pt = place.place_type) ? pt.name : ""
    when "latitude" then (lat = place.latitude).nil? ? "" : lat.round(6)
    when "longitude" then (lng = place.longitude).nil? ? "" : lng.round(6)
    when "container" then (pc = place.container) ? pc.full_name : ""
    when "actions"
      links = []
      links << link_to_if_auth("Edit", edit_place_path(place), "places#update", place)
      links << link_to_if_auth("Delete", place, "places#destroy", place,
        :method => :delete, :confirm => "Are you sure you want to delete #{place.full_name}?")
      join_links(*links)
    else place.send(field)
    end
  end
end
{'fraction_non_alphanumeric': 0.16178343949044585, 'fraction_numerical': 0.0025477707006369425, 'mean_word_length': 3.527377521613833, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '7631294', 'n_tokens_mistral': 531, 'n_tokens_neox': 524, 'n_words': 133}