Rails 4: set layout equal to false in controller

ruby-on-rails, ruby-on-rails-4

Solution

To disable layout for a controller:

class FooController < ApplicationController
  layout false
  ...
end

Problem

In a Rails 4 app I am trying to set the layout to `false` or `nil`. I tried this from inside my controller: ``` render :layout => false ``` But that gives this error: ``` undefined method `render'. ``` How can I stop this controller from using the default layout file?

Original source