Class: IronAdmin::Layout::ShellComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- IronAdmin::Layout::ShellComponent
- Defined in:
- app/components/iron_admin/layout/shell_component.rb
Overview
Renders the main admin panel shell with sidebar and navbar.
Instance Method Summary collapse
-
#before_render ⇒ void
private
Sets up default sidebar and navbar if not provided.
-
#initialize(current_user: nil) ⇒ ShellComponent
constructor
A new instance of ShellComponent.
Constructor Details
#initialize(current_user: nil) ⇒ ShellComponent
Returns a new instance of ShellComponent.
12 13 14 |
# File 'app/components/iron_admin/layout/shell_component.rb', line 12 def initialize(current_user: nil) @current_user = current_user end |
Instance Method Details
#before_render ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Sets up default sidebar and navbar if not provided.
19 20 21 22 |
# File 'app/components/iron_admin/layout/shell_component.rb', line 19 def before_render unless (current_user: @current_user) unless end |