>…looking for a module named Rendering in the ActionController
> namespace, since that is the namesapce that Base is defined in???

module Rendering
  def greet
    puts 'hi'
  end
end

module ActionController
  class Base
    include Rendering
  end
end


obj = ActionController::Base.new
obj.greet

--output:--
hi



module Rendering
  def greet
    puts 'hi'
  end
end

module ActionController
  module Rendering
    def greet
      puts 'bye'
    end
  end

  class Base
    include Rendering
  end
end


obj = ActionController::Base.new
obj.greet


--output:--
bye



module Rendering
  def greet
    puts 'hi'
  end
end

module ActionController
  module Rendering
    def greet
      puts 'bye'
    end
  end

  class Base
    include Rendering

    module Rendering
      def greet
        puts "It's hot down here."
      end
    end
  end
end

obj = ActionController::Base.new
obj.greet


--output:--
bye



module Rendering
  def greet
    puts 'hi'
  end
end

module ActionController
  module Rendering
    def greet
      puts 'bye'
    end
  end

  class Base
    module Rendering
      def greet
        puts "It's hot down here."
      end
    end

    include Rendering
  end
end


obj = ActionController::Base.new
obj.greet

--output:--
It's hot down here.

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to