Class: Vedeu::ApplicationController

Inherits:
Object
  • Object
show all
Includes:
Controller
Defined in:
lib/vedeu/application/application_controller.rb

Overview

Provides methods which should be available to all client application controllers. The client application’s ApplicationController will inherit from this class.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Controller

included

Constructor Details

#initialize(**params) ⇒ Vedeu::ApplicationController

Returns a new instance of Vedeu::ApplicationController.

Parameters:

  • params (Hash)

    The named parameters provided to the controller which will be used by the actions within the controller.



21
22
23
# File 'lib/vedeu/application/application_controller.rb', line 21

def initialize(**params)
  @params = params
end

Instance Attribute Details

#paramsHash (protected)

Returns The named parameters passed to the controller.

Returns:

  • (Hash)

    The named parameters passed to the controller.



41
42
43
# File 'lib/vedeu/application/application_controller.rb', line 41

def params
  @params
end

Instance Method Details

#redirect_to(controller, action, **params) ⇒ Object Also known as: redirect, goto

Parameters:

  • controller (Symbol)

    The name of controller to be redirected to.

  • action (Symbol)

    The name of the action within the controller to be called.

  • params (Hash)

    Any named parameter which need to be passed to the action.



31
32
33
# File 'lib/vedeu/application/application_controller.rb', line 31

def redirect_to(controller, action, **params)
  Vedeu.trigger(:_goto_, controller, action, params)
end