Module: Tenantable::Schema::Model::ClassMethods

Defined in:
lib/tenantable/schema/model.rb

Instance Method Summary collapse

Instance Method Details

#schema(schema = nil) ⇒ Object



24
25
26
27
# File 'lib/tenantable/schema/model.rb', line 24

def schema(schema=nil)
 table_name =  self.table_name.split('.', 2).last
 self.table_name = "#{schema}.#{table_name}"
end