Permalink
Browse files

Fix 'Can't mass-assign protected attributes: tags_attributes' in Rail…

…s 3.2.3.
  • Loading branch information...
1 parent bf7b8cf commit 74f328f0ab7b20694037385adb5220e340a36bd7 @kfr2 kfr2 committed Apr 29, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 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? } }

0 comments on commit 74f328f

Please sign in to comment.