<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,16 +1,19 @@
 # Bouncer
-
 class ActionController::Base
   before_filter :cache_params_hash
   
-  def self.allow_assignment(*assignable_attributes_hash)    
-    assignable_attributes_hash.each do |attribute_hash|
-      attribute_hash.keys.each do |key|
-        before_filter { |controller| controller.send(:slice_attributes_for, key, attribute_hash[key]) }
+  def self.allow_params(*param_sets)
+    param_sets.each do |param|
+      if param.respond_to? :to_sym
+        before_filter { |controller| controller.send(:slice_attribute, param)}
+      elsif
+        param.keys.each do |key|
+          before_filter { |controller| controller.send(:slice_attributes_for, key, param[key]) }
+        end
       end
     end
   end
-  
+
   private
   
   def cache_params_hash
@@ -20,10 +23,17 @@ class ActionController::Base
     params.slice!(*keys)
   end
 
-  def slice_attributes_for(params_hash_symbol, assignable_attributes)
-    if @cached_params_hash[params_hash_symbol]
-      allowed_attributes = @cached_params_hash[params_hash_symbol].slice(*assignable_attributes) 
-      params[params_hash_symbol] = allowed_attributes
+  def slice_attribute(param_key)
+    if @cached_params_hash[param_key]
+      allowed_attribute = @cached_params_hash[param_key]
+      params[param_key] = allowed_attribute
+    end
+  end
+  
+  def slice_attributes_for(param_key, assignable_attributes)
+    if @cached_params_hash[param_key]
+      allowed_attributes = @cached_params_hash[param_key].slice(*assignable_attributes) 
+      params[param_key] = allowed_attributes
     end
   end
 end</diff>
      <filename>lib/bouncer.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>75fa3d5da3dcb88c6a4ba42315d631823ad05149</id>
    </parent>
  </parents>
  <author>
    <name>Ben Schwarz</name>
    <email>ben.schwarz@gmail.com</email>
  </author>
  <url>http://github.com/benschwarz/bouncer/commit/f3095d24cfb876e828a3c469821cec3989079e1d</url>
  <id>f3095d24cfb876e828a3c469821cec3989079e1d</id>
  <committed-date>2009-07-02T20:01:03-07:00</committed-date>
  <authored-date>2009-07-02T20:01:03-07:00</authored-date>
  <message>Allowing single params for things like account activation codes. New API method to reflect the change better</message>
  <tree>93cdfbd0649a96720a4fd91dd518612691dfc5cf</tree>
  <committer>
    <name>Ben Schwarz</name>
    <email>ben.schwarz@gmail.com</email>
  </committer>
</commit>
