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