Sha256: 18e1b84972dcbe61ca195197772262c63c9ab341b013efc3c4de2b4b8232b83c
Contents?: true
Size: 774 Bytes
Versions: 11
Compression:
Stored size: 774 Bytes
Contents
class Kaui::TagsController < Kaui::EngineController def index end def pagination search_key = params[:sSearch] offset = params[:iDisplayStart] || 0 limit = params[:iDisplayLength] || 10 tags = Kaui::Tag.list_or_search(search_key, offset, limit, options_for_klient) json = { :sEcho => params[:sEcho], :iTotalRecords => tags.pagination_max_nb_records, :iTotalDisplayRecords => tags.pagination_total_nb_records, :aaData => [] } tags.each do |tag| json[:aaData] << [ tag.tag_id, tag.object_type, tag.tag_definition_name, ] end respond_to do |format| format.json { render :json => json } end end end
Version data entries
11 entries across 11 versions & 1 rubygems