Class: ChefFixie::Sql::Invites

Inherits:
SqlTable
  • Object
show all
Defined in:
lib/chef_fixie/sql_objects.rb

Instance Method Summary collapse

Methods inherited from SqlTable

#all, element, filter_by, #filter_core, #get_table, #initialize, #inner, max_count_default, #mk_element, primary, table

Methods included from AuthzMapper

#authz_to_name, included, mapper, register, struct_to_name

Constructor Details

This class inherits a constructor from ChefFixie::Sql::SqlTable

Instance Method Details

#by_org_id_user_id(org_id, user_id) ⇒ Object



459
460
461
462
# File 'lib/chef_fixie/sql_objects.rb', line 459

def by_org_id_user_id(org_id, user_id)
  # db table constraint guarantees that this is unique
  inner.filter(:org_id => org_id, :user_id => user_id).all.first
end