Module: AppKit::Dsl::ApplicationDsl
- Included in:
- Application
- Defined in:
- lib/app_kit/dsl/application_dsl.rb
Instance Method Summary collapse
-
#dashboard(&block) ⇒ Object
DSL method for configuring the dashboard.
-
#disable_authentication ⇒ Object
DSL method to disable user authentication.
-
#navigation_item(title, path_helper, options = {}) ⇒ Object
DSL method for creating custom naviation items.
-
#title(title_text) ⇒ Object
DSL method to set the application title.
Instance Method Details
#dashboard(&block) ⇒ Object
DSL method for configuring the dashboard. This is called from the initializer
16 17 18 |
# File 'lib/app_kit/dsl/application_dsl.rb', line 16 def dashboard(&block) AppKit.application.dashboard_view.instance_eval(&block) end |
#disable_authentication ⇒ Object
DSL method to disable user authentication. This is called from the initializer
10 11 12 |
# File 'lib/app_kit/dsl/application_dsl.rb', line 10 def disable_authentication config.authentication_enabled = false end |
#navigation_item(title, path_helper, options = {}) ⇒ Object
DSL method for creating custom naviation items. This is called from the initializer
22 23 24 25 26 27 28 29 30 |
# File 'lib/app_kit/dsl/application_dsl.rb', line 22 def (title, path_helper, ={}) nav_item = AppKit::.new nav_item.title = title nav_item.path_helper = path_helper nav_item.icon = [:icon] nav_item.position = [:position] || :left nav_item.controller = [:controller] << nav_item end |
#title(title_text) ⇒ Object
DSL method to set the application title. This is called from the initializer.
4 5 6 |
# File 'lib/app_kit/dsl/application_dsl.rb', line 4 def title(title_text) config.application_title = title_text end |