config.reload_plugins = true is not picking up all the changes

Currently I am tweaking resources_controller plugin to fit to our
need, I changed all the references of require to require_dependency so
that Rails will take care of whether to use require or load
dependening on the environment. I heard that even in development
environment, rails is not going to reload the plugins even though I
use require_dependency unless I set config.reload_plugins = true.

At first, I was very much excited, to see that Rails is in deed
reloading the files (Constants) and this is a very good news, because
I can see the changes I make to the plugins without restarting the
server everytime. Unfortunately my excitement didnot last very long
when I see that Rails is reloading all the files under the lib folder
of the plugin except the init.rb and my first reference to the Plugin.
For instance, resources_controller defined the following in init.rb:

require_dependency 'ardes/resources_controller'
ActionController::Base.send :extend, Ardes::ResourcesController

Andres::ResourcesController (Module) resides in
resources_controller.rb under lib/andres/ folder. Apart from this file
(I call it Plugin Core file) and init.rb, there are bunch of other
files under lib/andres/resources_controller folder. Where appropriate
I included require_dependency instead of require. For some reason
(that I can't figure out yet) Rails is reloading all the other files
except init.rb and resources_controller.rb

If someone can shed light I would appreciate it.

<b>Related Information:</b>
Resources_Controller Plugin Folder Structure:

Contents of resources_controller.rb (Plugin Core File)
require_dependency 'ardes/resources_controller/specification'
require_dependency 'ardes/resources_controller/include_actions'
require_dependency 'ardes/resources_controller/actions'
require_dependency 'ardes/resources_controller/singleton_actions'
require_dependency 'ardes/resources_controller/helper'
require_dependency 'ardes/resources_controller/named_route_helper'

module Ardes#:nodoc:
  module ResourcesController
    mattr_accessor :actions, :singleton_actions
    self.actions = Ardes::ResourcesController::Actions
    self.singleton_actions =

    def self.extended(base)
      base.class_eval do
        class_inheritable_reader :resource_specification_map


    def resources_controller_for(name, options = {}, &block)
(:class, :source, :singleton, :actions, :in, :find, :load_enclosing, :route, :segment, :as, :only, :except)
      when_options = {:only => options.delete(:only), :except =>

      #unless included_modules.include?
        class_inheritable_reader :specifications, :route_name
        hide_action :specifications, :route_name
        extend Ardes::ResourcesController::ClassMethods
        include Ardes::ResourcesController::InstanceMethods
        helper Ardes::ResourcesController::Helper
        include Ardes::ResourcesController::NamedRouteHelper

      before_filter(:load_enclosing_resources, when_options) unless

      #before_filter :some_action

      before_filter :load_resources, :only => [:index]
      before_filter :load_resource, :only =>
[:show, :edit, :update, :destroy]
      before_filter :build_resource, :only => [:new, :create]

      write_inheritable_attribute(:specifications, [])
      specifications << '*' unless options.delete(:load_enclosing) ==

      unless (actions = options.delete(:actions)) == false
        actions ||= options[:singleton] ?
Ardes::ResourcesController.singleton_actions :
        include_actions actions, when_options

      route = (options.delete(:route) || name).to_s
      name = options[:singleton] ? name.to_s : name.to_s.singularize
      write_inheritable_attribute :route_name, options[:singleton] ?
route : route.singularize

      nested_in(*options.delete(:in)) if options[:in]

      write_inheritable_attribute(:resource_specification,, options, &block))

    # Creates a resource specification mapping. Use this to specify
how to find an enclosing resource that
    # does not obey usual rails conventions. Most commonly this would
be a singleton resource.

Don't worry about it. I finally figured it out. It looks like plugin
methods that add funtionality to core modules (ActionController,
ActiveRecord,..) will not be removed from the memory table though we
say config.reload_plugins as the rails is not reloadable even in
development mode.