<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -67,6 +67,21 @@ will find the record with a matching ID to the URL parameter associated with the
 
 needs :record =&gt; :user, :from =&gt; :user_id
 
+Flushing and Removal of Needs
+-----------------------------
+
+If for some reason you want a controller not to inherit existing needs or you for some 
+reason want to remove needs, there's a simple way to remove them:
+
+class MyController &lt; ApplicationController
+  does_not_need :anything       # removes all styles and behaviors from the need chain
+  does_not_need :any_styles
+  does_not_need :any_scripts
+  does_not_need :styles =&gt; &quot;some_style&quot;
+  does_not_need :styles =&gt; [&quot;some_style&quot;, &quot;another_one&quot;]  
+  does_not_need :scripts =&gt; &quot;some_script&quot;
+end
+
 Resources
 =========
 </diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -18,6 +18,18 @@ module Intridea
         append_behavior_to_chain(behaviors)
       end
       
+      def does_not_behave_with(*behaviors)
+        behaviors = behaviors.collect(&amp;:to_s)
+        behaviors.each{|b| behavior_chain.delete(b)}
+        update_behavior_conditions(behaviors,[])
+      end
+      
+      def flush_behaviors
+        write_inheritable_attribute('behavior_chain',[])
+        write_inheritable_attribute('included_behavior_actions', {})
+        write_inheritable_attribute('excluded_behavior_actions', {})        
+      end
+      
       def included_behavior_actions #:nodoc:
         @included_behavior_actions ||= read_inheritable_attribute('included_behavior_actions') || {}
       end</diff>
      <filename>lib/intridea/behavior_chain.rb</filename>
    </modified>
    <modified>
      <diff>@@ -22,6 +22,24 @@ module Intridea
         end  
       end
       
+      def does_not_need(arg)
+        if arg.is_a?(Hash)
+          if arg[:styles]
+            does_not_style_with(*arg[:styles])
+          end
+          if arg[:scripts]
+            does_not_behave_with(*arg[:scripts])
+          end
+        elsif arg == :anything
+          flush_styles
+          flush_behaviors
+        elsif arg == :any_styles
+          flush_styles
+        elsif arg == :any_scripts
+          flush_behaviors
+        end
+      end
+      
       private
 
       def memoize_record(record, options)
@@ -36,28 +54,6 @@ module Intridea
           helper_method :#{options[:as].to_s}
         RUBY
       end
-    end 
-    
-    module InstanceMethods
-      def do_grabs
-        self.class.grab_options.each do |grab_option|
-          grab(*grab_option)
-        end
-      end
-      
-      def grab(object, options = {})
-      	options[:from] ||= params[:id]
-      	options[:except] ||= Array.new
-      	options[:only] ||= Array.new
-      	options[:as] ||= object
-
-      	if params[:id].nil?
-      	  instance_variable_set(&quot;@#{options[:as].to_s}&quot;, nil)
-      	  return
-      	end
-
-      	instance_variable_set(&quot;@#{options[:as].to_s}&quot;, object.to_s.classify.constantize.find(options[:from])) if !options[:except].include?(action_name) or (!options[:only].nil? and options[:only].include?(action_name))
-      end
     end
   end
 end
\ No newline at end of file</diff>
      <filename>lib/intridea/needy_controllers.rb</filename>
    </modified>
    <modified>
      <diff>@@ -18,6 +18,18 @@ module Intridea
         append_style_to_chain(styles)
       end
       
+      def does_not_style_with(*styles)
+        styles = styles.collect(&amp;:to_s)
+        styles.each{|s| style_chain.delete(s)}
+        update_style_conditions(styles,[])
+      end
+      
+      def flush_styles
+        write_inheritable_attribute('style_chain',[])
+        write_inheritable_attribute('included_style_actions', {})
+        write_inheritable_attribute('excluded_style_actions', {})        
+      end
+      
       def included_style_actions #:nodoc:
         @included_style_actions ||= read_inheritable_attribute('included_style_actions') || {}
       end</diff>
      <filename>lib/intridea/style_chain.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ca413f984f984629bcced1d5ed23ad388b58f77e</id>
    </parent>
  </parents>
  <author>
    <name>michael</name>
    <email>michael@0572c0d6-f9f1-4294-a55b-9f92c10757d9</email>
  </author>
  <url>http://github.com/mbleigh/needy-controllers/commit/b4fda7c978d269e3d05b8179e76c7b234e9a62bd</url>
  <id>b4fda7c978d269e3d05b8179e76c7b234e9a62bd</id>
  <committed-date>2008-03-20T07:56:58-07:00</committed-date>
  <authored-date>2008-03-20T07:56:58-07:00</authored-date>
  <message>[needy_controllers] Can now 'un-need' things through the does_not_need statement.

git-svn-id: http://svn.intridea.com/svn/public/needy_controllers@50 0572c0d6-f9f1-4294-a55b-9f92c10757d9</message>
  <tree>561d037d9f5bd0eeecac3b42fe536ef680117daf</tree>
  <committer>
    <name>michael</name>
    <email>michael@0572c0d6-f9f1-4294-a55b-9f92c10757d9</email>
  </committer>
</commit>
