engine/app/helpers/locomotive/content_entries_helper.rb

14 lines
349 B
Ruby
Raw Normal View History

module Locomotive::ContentEntriesHelper
def options_for_belongs_to_custom_field(class_name)
2012-02-02 15:53:26 +00:00
content_type = Locomotive::ContentType.class_name_to_content_type(class_name, current_site)
if content_type
content_type.ordered_entries.map { |entry| [entry._label, entry._id] }
else
[] # unknown content type
end
end
end