class Gutentag::Multitenancy::TenantTagger
Attributes
tenant_id[R]
Public Class Methods
new(tenant_id)
click to toggle source
# File lib/gutentag/multitenancy/tenant_tagger.rb, line 5 def initialize(tenant_id) @tenant_id = tenant_id end
Public Instance Methods
find_by_name(name)
click to toggle source
# File lib/gutentag/multitenancy/tenant_tagger.rb, line 9 def find_by_name(name) Gutentag::Tag.find_by_name_and_tenant_id(name, tenant_id) end
find_or_create(name)
click to toggle source
# File lib/gutentag/multitenancy/tenant_tagger.rb, line 13 def find_or_create(name) Gutentag::Tag.find_or_create_by_name_and_tenant_id(name, tenant_id) end