<commit_before>h1. filter_attr Rails Plugin

Provides tools to securely manage mass assignment in Rails models.

h2. Examples:

* Working with models:

<pre>
# everything inside the block will honor attr_accesible
User.with_attr_accessible(:name, :email) do
  u = User.new(:name => 'John', :email => '<EMAIL>', :password => '<PASSWORD>')
  # password was not initialized
  puts "Password assignment protected?: #{u.password.nil?}"
end

u = User.new(:name => 'John', :email => '<EMAIL>', :password => '<PASSWORD>')
# password was initialized
puts "Password assignment protected?: #{u.password.nil?}"
</pre>

* Working with controllers<commit_msg>better README format<commit_after>h1. filter_attr Rails Plugin

Provides tools to securely manage mass assignment in Rails models.

h2. Examples:

* Working with models:

<pre><code class="ruby">
# everything inside the block will honor attr_accesible
User.with_attr_accessible(:name, :email) do
  u = User.new(:name => 'John', :email => '<EMAIL>', :password => '<PASSWORD>')
  # password was not initialized
  puts "Password assignment protected?: #{u.password.nil?}"
end

u = User.new(:name => 'John', :email => '<EMAIL>', :password => '<PASSWORD>')
# password was initialized
puts "Password assignment protected?: #{u.password.nil?}"
</code></pre>


* Working with controllers
{'fraction_non_alphanumeric': 0.14803625377643503, 'fraction_numerical': 0.0030211480362537764, 'mean_word_length': 5.3701923076923075, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2430566', 'n_tokens_mistral': 404, 'n_tokens_neox': 394, 'n_words': 134}