Class: ConcertoHardware::ApplicationController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/concerto_hardware/application_controller.rb

Overview

Congratulations! You’ve found this engine’s secret sauce. In a regular isolated engine, the engine’s ApplicationController inherits from ActionController::Base. We’re using the the main app’s ApplicationController, making the isolation a little less strict. For example, we get the layout from the main Concerto app. Note that links back to the main application will need to directly reference the main_app router.

Direct Known Subclasses

PlayersController

Instance Method Summary collapse

Instance Method Details

#current_abilityObject



10
11
12
13
14
# File 'app/controllers/concerto_hardware/application_controller.rb', line 10

def current_ability
  # Use the Ability class defined in this engine's namespace.
  # It is designed to also include the rules from the main app.
  @current_ability ||= ConcertoHardware::Ability.new(current_accessor)
end