mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-17 00:07:24 +00:00
18 lines
300 B
Ruby
18 lines
300 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Admin
|
|
module EnterprisesHelper
|
|
def add_check_if_single(count)
|
|
if count == 1
|
|
{ checked: true }
|
|
else
|
|
{}
|
|
end
|
|
end
|
|
|
|
def select_only_item(producers)
|
|
producers.size == 1 ? producers.first.id : nil
|
|
end
|
|
end
|
|
end
|