Module: TasksSchedulerHelper
- Defined in:
- app/helpers/tasks_scheduler_helper.rb
Constant Summary collapse
- NAVBAR_ENTRIES =
{ tasks_scheduler_daemon: 'tasks_scheduler_daemon', scheduled_tasks: 'scheduled_tasks', tasks_scheduler_status: :status_scheduled_tasks }.freeze
Instance Method Summary collapse
Instance Method Details
#tasks_scheduler_navbar ⇒ Object
10 11 12 13 14 |
# File 'app/helpers/tasks_scheduler_helper.rb', line 10 def content_tag(:navbar) do safe_join(.map { |label, path| link_to label, path }, ' | ') end end |
#tasks_scheduler_navbar_entries ⇒ Object
16 17 18 19 20 |
# File 'app/helpers/tasks_scheduler_helper.rb', line 16 def NAVBAR_ENTRIES .map { |i18n_key, path_name| [::I18n.t(i18n_key), send("#{path_name}_path")] } .to_h end |