Changeset 1276

Show
Ignore:
Timestamp:
01/10/08 17:29:25 (9 months ago)
Author:
lancecarls..@gmail.com
Message:

Fixed spacial issues with README

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/merb_param_protection/README

    r1275 r1276  
    77The request sets:  
    88 
    9        params => { :post => { :title => "ello", :body => "Want it", :status => "green", :author_id => 3, :rank => 4 } } 
     9  params => { :post => { :title => "ello", :body => "Want it", :status => "green", :author_id => 3, :rank => 4 } } 
    1010 
    1111  Example 1: params_accessable 
     
    1414  end 
    1515 
    16        params.inspect # => { :post => { :title => "ello", :body => "Want it" } } 
     16  params.inspect # => { :post => { :title => "ello", :body => "Want it" } } 
    1717 
    1818So we see that params_accessible removes everything except what is explictly specified. 
    1919 
    20        Example 2: params_protected 
    21        MyOtherController < Application 
    22        params_protected :post => [:status, :author_id] 
    23        end 
     20  Example 2: params_protected 
     21  MyOtherController < Application 
     22    params_protected :post => [:status, :author_id] 
     23  end 
    2424 
    25        params.inspect # => { :post => { :title => "ello", :body => "Want it", :rank => 4 } } 
     25  params.inspect # => { :post => { :title => "ello", :body => "Want it", :rank => 4 } } 
    2626 
    2727We also see that params_protected removes ONLY those parameters explicitly specified.