<commit_before>class Alohomora::Organization < AlohomoraModel
  attr_accessible :active, :creator_id, :name
  
  has_and_belongs_to_many :users, join_table: "alohomora_organizations_users"
  
  
  class << self
    
    # Requests a specific organization where the user has access to the information
    def get_user_organziation(org_id, user)
      self.joins(:users).where(id: org_id, users: {id: user.id})
    end
    
    
  end
  
end
<commit_msg>added changes to support quering of user organizations<commit_after>class Alohomora::Organization < AlohomoraModel
  attr_accessible :active, :creator_id, :name
  
  has_and_belongs_to_many :users, join_table: "alohomora_organizations_users"
  
  
  class << self
    
    # Requests a specific organization where the user has access to the information
    def get_user_organziation(org_id, user)
      self.joins(:users).where(id: org_id, users: {id: user.id}).first
    end
    
    
  end
  
end

{'fraction_non_alphanumeric': 0.07676130389064142, 'fraction_numerical': 0.0, 'mean_word_length': 3.7839195979899496, 'pattern_counts': {'":': 0, '<': 9, '<?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': '5813902', 'n_tokens_mistral': 322, 'n_tokens_neox': 319, 'n_words': 79}