We can get desired format of output, using the advance use of ‘render’. If we need to render some data in different format like STRING, JSON, XML, following are the different ways to do the job.
Method 1 : Render as String
render :string => ‘This is a sample line’
end Continue reading