By default Rails will use app/views/layouts/application.html.erb
as the layout. If you want to use another layout, create app/views/layouts/my-new-layout.html.erb
then
In your controller method:
respond_to do |format|
format.html { render layout: 'my-new-layout' }
format.json { render json: @cars }
end
Here's the relevant section in the Rails Guide: Layouts and Rendering: Options for Render