Class: ColumnsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/columns_controller.rb

Constant Summary

Constants inherited from ApplicationController

ApplicationController::ALLOWABLE_CONFIGS

Instance Method Summary collapse

Instance Method Details

#indexObject



4
5
6
7
8
9
10
11
12
13
14
# File 'app/controllers/columns_controller.rb', line 4

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