Module: Comable::Apartment
- Defined in:
- lib/comable/apartment.rb,
lib/comable/apartment/engine.rb,
lib/comable/apartment/version.rb,
lib/comable/apartment/constraint.rb,
app/helpers/comable/apartment/application_helper.rb,
app/controllers/comable/apartment/users_controller.rb,
app/controllers/comable/apartment/tenants_controller.rb,
app/controllers/comable/apartment/dashboard_controller.rb,
app/controllers/comable/apartment/application_controller.rb,
app/controllers/comable/apartment/user_sessions_controller.rb
Defined Under Namespace
Modules: ApplicationHelper
Classes: ApplicationController, Constraint, DashboardController, Engine, TenantsController, UserSessionsController, UsersController
Constant Summary
collapse
- DEFAULT_EXCLUDED_MODELS =
%w(
Comable::Tenant
)
- VERSION =
'0.0.1'
Class Method Summary
collapse
Class Method Details
.config {|_self| ... } ⇒ Object
34
35
36
|
# File 'lib/comable/apartment.rb', line 34
def config
yield self if block_given?
end
|
.excluded_models=(models) ⇒ Object
38
39
40
|
# File 'lib/comable/apartment.rb', line 38
def excluded_models=(models)
::Apartment.configure { |config| config.excluded_models = models }
end
|
.routes(router, options = {}) ⇒ Object
52
53
54
55
56
57
58
59
|
# File 'lib/comable/apartment.rb', line 52
def routes(router, options = {})
options.reverse_merge! at: '/'
router.instance_eval do
constraints Comable::Apartment::Constraint do
mount Comable::Apartment::Engine, options
end
end
end
|
.tenant_names=(names) ⇒ Object
42
43
44
|
# File 'lib/comable/apartment.rb', line 42
def tenant_names=(names)
::Apartment.configure { |config| config.tenant_names = names }
end
|
.translate(key, options = {}) ⇒ Object
Also known as:
t
46
47
48
|
# File 'lib/comable/apartment.rb', line 46
def translate(key, options = {})
I18n.translate("comable.apartment.#{key}", options)
end
|