Sha256: 1833b0c6cc68b923553bea5935721c9e9e8ac0d671b9f9674c731f686c210cc4

Contents?: true

Size: 1.19 KB

Versions: 57

Compression:

Stored size: 1.19 KB

Contents

module Vedeu

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

    include Vedeu::Controller

    # Returns an instance of Vedeu::ApplicationController.
    #
    # @param params [Hash] The named parameters provided to the
    #   controller which will be used by the actions within the
    #   controller.
    # @return [Vedeu::ApplicationController]
    def initialize(**params)
      @params = params
    end

    # @param controller [Symbol] The name of controller to be
    #   redirected to.
    # @param action [Symbol] The name of the action within the
    #   controller to be called.
    # @param params [Hash] Any named parameter which need to be passed
    #   to the action.
    def redirect_to(controller, action, **params)
      Vedeu.trigger(:_goto_, controller, action, params)
    end
    alias_method :redirect, :redirect_to
    alias_method :goto, :redirect_to

    protected

    # @!attribute [rw] params
    # @return [Hash] The named parameters passed to the controller.
    attr_accessor :params

  end # ApplicationController

end # Vedeu

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
vedeu-0.6.64 lib/vedeu/application/application_controller.rb
vedeu-0.6.63 lib/vedeu/application/application_controller.rb
vedeu-0.6.62 lib/vedeu/application/application_controller.rb
vedeu-0.6.61 lib/vedeu/application/application_controller.rb
vedeu-0.6.60 lib/vedeu/application/application_controller.rb
vedeu-0.6.59 lib/vedeu/application/application_controller.rb
vedeu-0.6.58 lib/vedeu/application/application_controller.rb
vedeu-0.6.57 lib/vedeu/application/application_controller.rb
vedeu-0.6.56 lib/vedeu/application/application_controller.rb
vedeu-0.6.54 lib/vedeu/application/application_controller.rb
vedeu-0.6.53 lib/vedeu/application/application_controller.rb
vedeu-0.6.52 lib/vedeu/application/application_controller.rb
vedeu-0.6.51 lib/vedeu/application/application_controller.rb
vedeu-0.6.50 lib/vedeu/application/application_controller.rb
vedeu-0.6.49 lib/vedeu/application/application_controller.rb
vedeu-0.6.48 lib/vedeu/application/application_controller.rb
vedeu-0.6.47 lib/vedeu/application/application_controller.rb
vedeu-0.6.46 lib/vedeu/application/application_controller.rb
vedeu-0.6.45 lib/vedeu/application/application_controller.rb
vedeu-0.6.44 lib/vedeu/application/application_controller.rb