tasafo/tasafo_jobs

View on GitHub
app/helpers/jobs_helper.rb

Summary

Maintainability
A
0 mins
Test Coverage
F
42%
# frozen_string_literal: true

module JobsHelper
  def categories_for_select(model)
    options = [[I18n.t('categories.select_category'), '']]
    options += JobCategory.all.map { |j| [j.name, j.id] }

    options_for_select(options, selected: model.category_id || '')
  end

  def checkbox_checked(checked)
    !checked.nil?
  end
end