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

Version Path
aleph_analytics-0.4.9.pre.dev app/controllers/columns_controller.rb
aleph_analytics-0.4.8 app/controllers/columns_controller.rb
aleph_analytics-0.4.7 app/controllers/columns_controller.rb
aleph_analytics-0.4.4 app/controllers/columns_controller.rb
aleph_analytics-0.4.2 app/controllers/columns_controller.rb
aleph_analytics-0.4.1 app/controllers/columns_controller.rb
aleph_analytics-0.3.0 app/controllers/columns_controller.rb
aleph_analytics-0.2.0 app/controllers/columns_controller.rb
aleph_analytics-0.1.0 app/controllers/columns_controller.rb
aleph_analytics-0.0.6 app/controllers/columns_controller.rb
aleph_analytics-0.0.5 app/controllers/columns_controller.rb
aleph_analytics-0.0.4 app/controllers/columns_controller.rb
aleph_analytics-0.0.3 app/controllers/columns_controller.rb
aleph_analytics-0.0.2 app/controllers/columns_controller.rb
aleph_analytics-0.0.1.alpha app/controllers/columns_controller.rb
aleph_analytics-0.0.0.alpha app/controllers/columns_controller.rb