What is the easiest or shortest way to respond in an API controller. Currently, the following work is being done:
respond_to do |format|
format.json { render 'client', status: :ok }
end
however, this controller will only respond to json (response_to: json), so all response_to do | format | thing seems like unnecessary code.
Ideally, I just wanted to do something simple:
render 'client', status: :ok
Update:
I forgot to mention that: "client" is a jbuilder template that does not match the name of my action.
source
share