Class: Tzispa::Controller::AuthLayout

Inherits:
Base
  • Object
show all
Includes:
Helpers::Response
Defined in:
lib/tzispa/controller/auth_layout.rb

Instance Attribute Summary

Attributes inherited from Base

#application, #context

Instance Method Summary collapse

Methods inherited from Base

#call, #initialize

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 == ) || 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 , true, response
  end
end