def apply
      apply_publish

      kontroller = @controller
      
      Resourceful::ACTIONS.each do |action_named|
        # See if this is a method listed by #actions
        unless @ok_actions.include? action_named
          # If its not listed, then remove the method
          # No one can hit it... if its DEAD!
          @action_module.send :remove_method, action_named
        end
      end

      kontroller.hidden_actions.reject! &@ok_actions.method(:include?)
      kontroller.send :include, @action_module
      
      merged_callbacks = kontroller.resourceful_callbacks.merge @callbacks
      merged_responses = kontroller.resourceful_responses.merge @responses
      
      kontroller.resourceful_callbacks = merged_callbacks
      kontroller.resourceful_responses = merged_responses
      kontroller.made_resourceful = true

      kontroller.parents = @parents
      kontroller.shallow_parent = @shallow_parent
      kontroller.model_namespace = @model_namespace
      kontroller.before_filter :load_object, :only => (@ok_actions & SINGULAR_PRELOADED_ACTIONS) + @custom_member_actions
      kontroller.before_filter :load_objects, :only => (@ok_actions & PLURAL_ACTIONS) + @custom_collection_actions
      kontroller.before_filter :load_parent_object, :only => @ok_actions + @custom_member_actions + @custom_collection_actions
    end
def apply
      apply_publish

      kontroller = @controller
      
      Resourceful::ACTIONS.each do |action_named|
        # See if this is a method listed by #actions
        unless @ok_actions.include? action_named
          # If its not listed, then remove the method
          # No one can hit it... if its DEAD!
          @action_module.send :remove_method, action_named
        end
      end

      kontroller.hidden_actions.reject! &@ok_actions.method(:include?)
      kontroller.send :include, @action_module
      
      merged_callbacks = kontroller.resourceful_callbacks.merge @callbacks
      merged_responses = kontroller.resourceful_responses.merge @responses
      
      kontroller.resourceful_callbacks = merged_callbacks
      kontroller.resourceful_responses = merged_responses
      kontroller.made_resourceful = true

      kontroller.parents = @parents
      kontroller.shallow_parent = @shallow_parent
      kontroller.model_namespace = @model_namespace
      kontroller.before_filter :load_object, :only => (@ok_actions & SINGULAR_PRELOADED_ACTIONS) + @custom_member_actions
      kontroller.before_filter :load_objects, :only => (@ok_actions & PLURAL_ACTIONS) + @custom_collection_actions
      kontroller.before_filter :load_parent_object, :only => @ok_actions + @custom_member_actions + @custom_collection_actions
    end
def apply apply_publish kontroller = @controller Resourceful :: ACTIONS . each do | action_named | # See if this is a method listed by #actions unless @ok_actions . include? action_named # If its not listed, then remove the method # No one can hit it... if its DEAD! @action_module . send :remove_method , action_named end end kontroller . hidden_actions . reject! @ok_actions . method ( :include? ) kontroller . send :include , @action_module merged_callbacks = kontroller . resourceful_callbacks . merge @callbacks merged_responses = kontroller . resourceful_responses . merge @responses kontroller . resourceful_callbacks = merged_callbacks kontroller . resourceful_responses = merged_responses kontroller . made_resourceful = true kontroller . parents = @parents kontroller . shallow_parent = @shallow_parent kontroller . model_namespace = @model_namespace kontroller . before_filter :load_object , :only => ( @ok_actions & SINGULAR_PRELOADED_ACTIONS ) + @custom_member_actions kontroller . before_filter :load_objects , :only => ( @ok_actions & PLURAL_ACTIONS ) + @custom_collection_actions kontroller . before_filter :load_parent_object , :only => @ok_actions + @custom_member_actions + @custom_collection_actions end
The constructor is only meant to be called internally.

 This takes the klass (class object) of a controller
 and constructs a Builder ready to apply the make_resourceful
 additions to the controller.
 This method is only meant to be called internally.

 Applies all the changes that have been declared
 via the instance methods of this Builder
 to the kontroller passed in to the constructor.
The constructor is only meant to be called internally .