Serve a static JSON object file in rails
How do I serve a static JSON object from a file in rails? (I want to access it in an ajax call)?
What is the best method?
One Solution collect form web for “Serve a static JSON object file in rails”
Just place what you want to render in a variable, then use
render :json => variable
There are sensible defaults for lists, dicts, etc…
Item: “2.2.8 Rendering JSON”