Class: Tr8n::BaseController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Tr8n::BaseController
show all
- Defined in:
- app/controllers/tr8n/base_controller.rb
Direct Known Subclasses
Admin::BaseController, AwardsController, DashboardController, ForumController, GlossaryController, HelpController, LanguageCasesController, LanguageController, PhrasesController, TranslationsController, TranslatorController
Instance Method Summary
collapse
Instance Method Details
#tr8n_current_language ⇒ Object
56
57
58
|
# File 'app/controllers/tr8n/base_controller.rb', line 56
def tr8n_current_language
Tr8n::Config.current_language
end
|
#tr8n_current_translator ⇒ Object
66
67
68
|
# File 'app/controllers/tr8n/base_controller.rb', line 66
def tr8n_current_translator
Tr8n::Config.current_translator
end
|
#tr8n_current_user ⇒ Object
51
52
53
|
# File 'app/controllers/tr8n/base_controller.rb', line 51
def tr8n_current_user
Tr8n::Config.current_user
end
|
#tr8n_current_user_is_admin? ⇒ Boolean
71
72
73
|
# File 'app/controllers/tr8n/base_controller.rb', line 71
def tr8n_current_user_is_admin?
Tr8n::Config.current_user_is_admin?
end
|
#tr8n_current_user_is_guest? ⇒ Boolean
88
89
90
|
# File 'app/controllers/tr8n/base_controller.rb', line 88
def tr8n_current_user_is_guest?
Tr8n::Config.current_user_is_guest?
end
|
#tr8n_current_user_is_manager? ⇒ Boolean
81
82
83
84
85
|
# File 'app/controllers/tr8n/base_controller.rb', line 81
def tr8n_current_user_is_manager?
return true if Tr8n::Config.current_user_is_admin?
return false unless Tr8n::Config.current_user_is_translator?
tr8n_current_translator.manager?
end
|
#tr8n_current_user_is_translator? ⇒ Boolean
76
77
78
|
# File 'app/controllers/tr8n/base_controller.rb', line 76
def tr8n_current_user_is_translator?
Tr8n::Config.current_user_is_translator?
end
|
#tr8n_default_language ⇒ Object
61
62
63
|
# File 'app/controllers/tr8n/base_controller.rb', line 61
def tr8n_default_language
Tr8n::Config.default_language
end
|