I have an action common/location
#encoding: utf-8
class CommonController < ApplicationController
def location
@locations=Location.select(['`key`','name','parent'])
render json: @locations
end
end
I want to include this js through:
=javascript_include_tag "common/location"
but this dosen't work!
So I want to know how to include a js from an ation.