ruby on rails - What to use instead of respond_with -


from rails 4.2, respond_with , non-instance level respond_to have been moved responders gem. if want write json response not need responders gem, so question gives alternatives. however, there rails 4.2 or rails 5 guide deals topic of responding non-html in depth?

you can handle binding route format in routes.rb file.

ex.

get 'my-json-route', to: 'controller#action', defaults: { format: :json } 

here docs


Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

python 3.5 - Pyqtgraph string in x tick -