6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'app/controllers/kaui/tags_controller.rb', line 6
def
searcher = lambda do |search_key, offset, limit|
Kaui::Tag.list_or_search(search_key, offset, limit, options_for_klient)
end
= lambda do |tag, column|
[
tag.tag_id,
tag.object_id,
tag.object_type,
tag.tag_definition_name
][column]
end
formatter = lambda do |tag|
url_for_object = view_context.url_for_object(tag.object_id, tag.object_type)
[
tag.tag_id,
url_for_object ? view_context.link_to(tag.object_id, url_for_object) : tag.object_id,
tag.object_type,
tag.tag_definition_name
]
end
paginate searcher, , formatter
end
|