<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -57,6 +57,11 @@ you can just change the templates to whatever approach you prefer for
 setting the title.
 
 
+&lt;b&gt;I can't set new attributes in my model.&lt;/b&gt;
+
+Add the attribute to the attr_accessible line in the model.
+
+
 &lt;b&gt;I get &quot;undefined method 'root_url'&quot; error.&lt;/b&gt;
 
 Some generators default redirecting to the root_url. Set this in your
@@ -76,11 +81,6 @@ Try restarting your development server. Sometimes it doesn't detect the
 change in the routing.
 
 
-&lt;b&gt;I can't set new attributes in my User model.&lt;/b&gt;
-
-Add the attribute to the attr_accessible line in the model.
-
-
 &lt;b&gt;The tests/specs don't work.&lt;/b&gt;
 
 Make sure you have mocha installed and require it in your spec/test helper.</diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -1,2 +1,3 @@
 class &lt;%= class_name %&gt; &lt; ActiveRecord::Base
+  attr_accessible &lt;%= attributes.map { |a| &quot;:#{a.name}&quot; }.join(&quot;, &quot;) %&gt;
 end</diff>
      <filename>rails_generators/nifty_scaffold/templates/model.rb</filename>
    </modified>
    <modified>
      <diff>@@ -85,9 +85,10 @@ class TestNiftyScaffoldGenerator &lt; Test::Unit::TestCase
         end
       end
     
-      should &quot;generate model with class as camelcase name&quot; do
+      should &quot;generate model with class as camelcase name and add attr_accessible for attributes&quot; do
         assert_generated_file &quot;app/models/line_item.rb&quot; do |body|
           assert_match &quot;class LineItem &lt; ActiveRecord::Base&quot;, body
+          assert_match &quot;attr_accessible :name, :description&quot;, body
         end
       end
     end</diff>
      <filename>test/test_nifty_scaffold_generator.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>eda2516a07db1ed3e7a6952dfee3a60a935b4e19</id>
    </parent>
  </parents>
  <author>
    <name>Ryan Bates</name>
    <email>ryan@railscasts.com</email>
  </author>
  <url>http://github.com/ryanb/nifty-generators/commit/e585e769dd2816ba75404110005eb6285ce8812f</url>
  <id>e585e769dd2816ba75404110005eb6285ce8812f</id>
  <committed-date>2009-08-15T13:39:01-07:00</committed-date>
  <authored-date>2009-08-15T13:39:01-07:00</authored-date>
  <message>add attr_accessible line to scaffold models by default - closes #8</message>
  <tree>9a73f85a17e02d9f2e30581708a90e7b6624ae4c</tree>
  <committer>
    <name>Ryan Bates</name>
    <email>ryan@railscasts.com</email>
  </committer>
</commit>
