Class: QueryVersionsController

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

Constant Summary

Constants inherited from ApplicationController

ApplicationController::ALLOWABLE_CONFIGS

Instance Method Summary collapse

Instance Method Details

#indexObject



7
8
9
10
11
12
13
14
# File 'app/controllers/query_versions_controller.rb', line 7

def index
  respond_to do |format|
    format.json do
      @query_versions = query_versions.accessible_by(current_ability)
      render json: @query_versions
    end
  end
end

#showObject



16
17
18
19
20
21
22
23
# File 'app/controllers/query_versions_controller.rb', line 16

def show
  respond_to do |format|
    format.html { render :index }
    format.json do
      render json: @query_version
    end
  end
end