docbrown/app/helpers/organization_helper.rb
yheuhtozr f1c3138839
app/helpers i18n (#16003)
* app/helpers i18n

* tidy key names

* fix keys

* delete ja.yml

* fix spec

* fix spec 2

* fix for PR

* remove one key for PR

* delete ja.yml
2022-01-13 11:46:32 -05:00

8 lines
273 B
Ruby

module OrganizationHelper
def orgs_with_credits(organizations)
options = organizations.map do |org|
[I18n.t("helpers.organization_helper.option", org_name: org.name, unspent: org.unspent_credits_count), org.id]
end
options_for_select(options)
end
end