Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source
Show
Ignore:
Timestamp:
10/02/07 05:32:14 (1 year ago)
Author:
bitsweat
Message:

Ruby 1.9 compat, consistent load paths

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/lib/action_controller/components.rb

    r7438 r7719  
    3737  module Components 
    3838    def self.included(base) #:nodoc: 
    39       base.send :include, InstanceMethods 
    40       base.extend(ClassMethods) 
     39      base.class_eval do 
     40        include InstanceMethods 
     41        extend ClassMethods 
    4142 
    42       base.helper do 
    43         def render_component(options) 
    44           @controller.send(:render_component_as_string, options) 
     43        helper do 
     44          def render_component(options) 
     45            @controller.send!(:render_component_as_string, options) 
     46          end 
    4547        end 
    46       end 
    4748 
    48       # If this controller was instantiated to process a component request, 
    49       # +parent_controller+ points to the instantiator of this controller. 
    50       base.send :attr_accessor, :parent_controller 
     49        # If this controller was instantiated to process a component request, 
     50        # +parent_controller+ points to the instantiator of this controller. 
     51        attr_accessor :parent_controller 
    5152 
    52       base.class_eval do 
    5353        alias_method_chain :process_cleanup, :components 
    5454        alias_method_chain :set_session_options, :components