6
7
8
9
10
11
12
13
14
15
16
17
|
# File 'app/helpers/pages_core/admin/tag_editor_helper.rb', line 6
def tag_editor_for(
form_helper, item, field_name = :serialized_tags, options = {}
)
tags = options[:tags] || Tag.tags_and_suggestions_for(item, limit: 20)
tagged = options[:tagged] || item.tags
options[:placeholder] ||= "Add tag..."
tag.div(class: "tag-editor clearfix") do
form_helper.hidden_field(field_name, class: "serialized_tags") +
tag_check_boxes(tags, tagged) +
add_tag_button(options)
end
end
|