I\'m use the remote: true
idiom from the Working with Javascript in Rails guide:
# new.html.slim
= form_for @thing, remote: true do |f|
f.text
With most of the options to render, the rendered content is displayed as part of the current layout.
You can use the :layout option to tell Rails to use a specific file as the layout for the current action:
render layout: false
You’ve heard that Rails promotes “convention over configuration.” Default rendering is an excellent example of this. By default, controllers in Rails automatically render views with names that correspond to actions
You can use it to avoid the render false for the particular action which may affect you in code latency
layout false
layout 'foo', :except => :create