static public Method

Components.included(base)

There's no documentation for this item.

Source Code

# File action_controller/components.rb, line 38
def self.included(base) #:nodoc:
  base.class_eval do
    include InstanceMethods
    extend ClassMethods

    helper do
      def render_component(options)
        @controller.send!(:render_component_as_string, options)
      end
    end

    # 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, :components
    alias_method_chain :set_session_options, :components
    alias_method_chain :flash, :components

    alias_method :component_request?, :parent_controller
  end
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.