For example, I want to stop render layout for all actions. I can write in ApplicationController this code and its work:
layout :false
So, I want to create gem, which add this functionality. I try this code in lib of my gem:
module MyLayout
class Engine < ::Rails::Engine
end
class ApplicationLayoutController < ApplicationController
layout :false
end
end
and this:
module MyLayout
class Engine < ::Rails::Engine
end
class ApplicationController < ActionController::Base
layout :false
end
end
But it is not working. How can I do it?