<commit_before>class WidgetPolicy < Trax::Controller::Authorization::Pundit::BasePolicy
  def initialize(*args)
    super(*args)
  end

  def index?
    true
  end

  def create?
    @result &&= user.can_create_widgets
  end

  def show?
    @result &&= user.can_read_widgets
  end

  def update?
    @result &&= user.can_update_widgets
  end

  def destroy?
    @result &&= user.can_destroy_widgets<commit_msg>fix index action in policy<commit_after>class WidgetPolicy < Trax::Controller::Authorization::Pundit::BasePolicy
  def initialize(*args)
    super(*args)
  end

  def index?
    @result &&= user.can_read_widgets
  end

  def create?
    @result &&= user.can_create_widgets
  end

  def show?
    @result &&= user.can_read_widgets
  end

  def update?
    @result &&= user.can_update_widgets
  end

  def destroy?
    @result &&= user.can_destroy_widgets
{'fraction_non_alphanumeric': 0.10532407407407407, 'fraction_numerical': 0.0, 'mean_word_length': 3.650537634408602, 'pattern_counts': {'":': 0, '<': 5, '<?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': '966869', 'n_tokens_mistral': 300, 'n_tokens_neox': 284, 'n_words': 64}