Module: Plutonium::Core::Controller
- Extended by:
- ActiveSupport::Concern
- Includes:
- Plutonium::Core::Controllers::AssociationResolver, Plutonium::Core::Controllers::Authorizable, Plutonium::Core::Controllers::Bootable, Plutonium::Core::Controllers::EntityScoping
- Included in:
- Portal::Controller, Resource::Controller
- Defined in:
- lib/plutonium/core/controller.rb
Instance Method Summary collapse
-
#rail? ⇒ Boolean
Whether the modern icon rail is active for this request.
-
#shell ⇒ Object
Resolved shell variant for this request: controller override, else the engine’s shell, else the global Plutonium.configuration.shell.
Methods included from Plutonium::Core::Controllers::AssociationResolver
Methods included from Plutonium::Core::Controllers::EntityScoping
#scoped_entity_class, #scoped_entity_param_key, #scoped_entity_route_key, #scoped_entity_strategy, #scoped_to_entity?
Methods included from Plutonium::Core::Controllers::Bootable
#current_engine, #current_package
Instance Method Details
#rail? ⇒ Boolean
Whether the modern icon rail is active for this request. Resolves the per-controller ‘rail` setting, falling back to the shell default. Public: the resource layout calls `controller.rail?`.
71 72 73 74 |
# File 'lib/plutonium/core/controller.rb', line 71 def rail? return _rail_enabled unless _rail_enabled.nil? shell == :modern end |
#shell ⇒ Object
Resolved shell variant for this request: controller override, else the engine’s shell, else the global Plutonium.configuration.shell.
78 79 80 81 82 83 84 85 86 |
# File 'lib/plutonium/core/controller.rb', line 78 def shell return _shell unless _shell.nil? engine = current_engine engine_shell = engine.shell unless engine == Rails.application.class return engine_shell unless engine_shell.nil? Plutonium.configuration.shell end |