<commit_before>class <%= role_cname.camelize %>
  include Mongoid::Document
  
  has_and_belongs_to_many :<%= user_cname.tableize %>
  belongs_to :resource, :polymorphic => true
  
  field :name, :type => String
  index({ :name => 1 }, { :unique => true })


  index({
    :name => 1,
    :resource_type => 1,
    :resource_id => 1
  },
  { :unique => true})
  
  scopify
end<commit_msg>removed the redundant index for role-mongoid template, it was preventing the insertion of scoped roles. this fixes issue #109<commit_after>class <%= role_cname.camelize %>
  include Mongoid::Document
  
  has_and_belongs_to_many :<%= user_cname.tableize %>
  belongs_to :resource, :polymorphic => true
  
  field :name, :type => String

  index({
    :name => 1,
    :resource_type => 1,
    :resource_id => 1
  },
  { :unique => true})
  
  scopify
end
{'fraction_non_alphanumeric': 0.13690476190476192, 'fraction_numerical': 0.011904761904761904, 'mean_word_length': 3.521505376344086, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 21, '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': '4436077', 'n_tokens_mistral': 319, 'n_tokens_neox': 293, 'n_words': 72}