2022-04-07 18:15:21 -05:00
|
|
|
class CnasController < ApplicationController
|
|
|
|
def index
|
|
|
|
@cnas = Cna.all
|
|
|
|
end
|
|
|
|
|
|
|
|
def show
|
|
|
|
@cna = Cna.find(params[:id])
|
|
|
|
render json: @cna.to_json
|
|
|
|
end
|
|
|
|
|
|
|
|
def show_for_cna
|
|
|
|
@cna = Cna.find_by_cna_id(params[:cna_id])
|
|
|
|
render json: @cna.to_json
|
|
|
|
end
|
2022-04-07 18:26:42 -05:00
|
|
|
|
|
|
|
def show_for_orgname
|
2022-04-07 18:29:52 -05:00
|
|
|
@cnas = Cna.where('organization_name LIKE ?', "%#{params[:organization_name]}%")
|
|
|
|
render json: @cnas.to_json
|
2022-04-07 18:26:42 -05:00
|
|
|
end
|
2022-04-07 18:15:21 -05:00
|
|
|
end
|