1class ConstituenciesController < ApplicationController
 
2  before_action :set_cors_headers, only: [:index], if: :json_request?
 
3
  • Complexity 2 » saikuro
4  def index
 
5    @constituencies = Constituency.by_ons_code
 
6
 
7    respond_to do |format|
 
8      format.json
 
 9    end
 
10  end
 
11end