10
11
12
13
14
15
16
17
18
19
|
# File 'app/models/tenant_model.rb', line 10
def self.included(base)
base.module_eval do
belongs_to :company
before_create do
self.company = Company.current
end
default_scope lambda { where(:company_id => Company.current) }
end
end
|