Module: Components

Defined in:
lib/six-updater-web/vendor/plugins/render_component/lib/components.rb

Defined Under Namespace

Modules: ClassMethods, HelperMethods, InstanceMethods

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object

:nodoc:



2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/six-updater-web/vendor/plugins/render_component/lib/components.rb', line 2

def self.included(base) #:nodoc:
  base.class_eval do
    include InstanceMethods
    extend ClassMethods
    helper HelperMethods

    # If this controller was instantiated to process a component request,
    # +parent_controller+ points to the instantiator of this controller.
    attr_accessor :parent_controller

    alias_method_chain :process_cleanup, :render_component
    alias_method_chain :session=, :render_component
    alias_method_chain :flash, :render_component
    alias_method_chain :assign_shortcuts, :render_component
    alias_method_chain :send_response, :render_component

    alias_method :component_request?, :parent_controller
  end
end