aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Richardson <kevin@magically.us>2012-04-29 13:42:33 -0400
committerKevin Richardson <kevin@magically.us>2012-04-29 13:42:33 -0400
commit74f328f0ab7b20694037385adb5220e340a36bd7 (patch)
tree2cb1e32be77fbaf0986742474c175d474b824ef4
parentbf7b8cf6b31837ee9751cd174f128022c0fc5bb4 (diff)
downloadrails-74f328f0ab7b20694037385adb5220e340a36bd7.tar.gz
rails-74f328f0ab7b20694037385adb5220e340a36bd7.tar.bz2
rails-74f328f0ab7b20694037385adb5220e340a36bd7.zip
Fix 'Can't mass-assign protected attributes: tags_attributes' in Rails 3.2.3.
-rw-r--r--guides/source/getting_started.textile1
1 files changed, 1 insertions, 0 deletions
diff --git a/guides/source/getting_started.textile b/guides/source/getting_started.textile
index 6a761b6a46..02cc7be029 100644
--- a/guides/source/getting_started.textile
+++ b/guides/source/getting_started.textile
@@ -2127,6 +2127,7 @@ class Post < ActiveRecord::Base
has_many :comments, :dependent => :destroy
has_many :tags
+ attr_protected :tags
accepts_nested_attributes_for :tags, :allow_destroy => :true,
:reject_if => proc { |attrs| attrs.all? { |k, v| v.blank? } }