Class: Tzispa::Controller::AuthLayout
- Includes:
- Helpers::Response
- Defined in:
- lib/tzispa/controller/auth_layout.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Tzispa::Controller::Base
Instance Method Details
#render! ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/tzispa/controller/auth_layout.rb', line 14 def render! if (layout_name == login_layout) || context.logged? rig = Tzispa::Rig::Engine.layout name: layout_name, domain: application.domain, content_type: context.router_params[:format] || config.default_format response.body << rig.render(context) content_type rig.content_type else context.redirect login_layout, true, response end end |