From 74f328f0ab7b20694037385adb5220e340a36bd7 Mon Sep 17 00:00:00 2001 From: Kevin Richardson Date: Sun, 29 Apr 2012 13:42:33 -0400 Subject: Fix 'Can't mass-assign protected attributes: tags_attributes' in Rails 3.2.3. --- guides/source/getting_started.textile | 1 + 1 file changed, 1 insertion(+) 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? } } -- cgit v1.2.3