Sha256: 0278519146b8c59468e8084752bfaf5f5ec01f46f57f7e0f37847fc39d0df728
Contents?: true
Size: 594 Bytes
Versions: 16
Compression:
Stored size: 594 Bytes
Contents
class ColumnsController < ApplicationController respond_to :json def index respond_to do |format| if Role.configured_connections.include?(current_user.role) items = Schemas::Descriptors.instance.get(current_user.role).columns SchemaCommentMatcher.enrich(items) if params[:with_comments] format.json { render json: JSON.pretty_generate(paginate(items)) } else format.json { head :ok } end end end private def paginate(items) Schemas::Paginate.new([:schema, :table, :column, :comment_text]).page(items, params) end end
Version data entries
16 entries across 16 versions & 1 rubygems