1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
module Api class AgentsController < ApplicationController #before_action do #request.format = :json #end def create @agent = Agent.create!(agent_params) end def agent_params params.require(:agent).permit(:hostname) end end end