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

Listboxes in c# -

Excel Duty List -

Multilayer CSV to filtered excel -