On Rails 3.2.3, $ rails generate model ... yields attr_accessible in generated model.
This causes an error at Chapter 11 because it makes tags_attributes inaccessible by default.
So, it may be needed to append :tags_attributes to the argument list of attr_accessible, just like:
$ rails generate model ...
class Post < ActiveRecord::Base
attr_accessible :name, :title, :content, :tags_attributes
and fix related texts.
Thanks for reporting this. If you'd like, this can be fixed directly on https://github.com/lifo/docrails, which has public write access. See http://weblog.rubyonrails.org/2012/3/7/what-is-docrails/.
If you'd like to update the guide, feel free. If not, that's fine too, I'll update it. Let me know what you think.
can you submit a pull request please?
@vijaydev Did I speak out of turn? I thought guides were fair game under docrails as well.
@erichmenge Sorry, I kept this page open for a while and didn't see your comment when I posted mine.
I think @osak is referring to guides.rubyonrails.org (the guides as of 3.2.3 release). It will get updated with the changes made in 3-2-stable when 3.2.4 is released. So, to get a change in guides.rubyonrails.org, we need to update 3-2-stable and wait for 3.2.4.
The changes made in docrails are merged only to the master branch in rails and these (available currently at edgeguides/edgeapi) will reflect in guides/api only when Rails 4 is released.
That's why I asked for a PR which, I should have mentioned earlier, should be against 3-2-stable.
Stuff that is done in docrails goes straight to rails master. Anything else needs to be a regular PR on the appropriate branches. So you can make the change in a local branch and make a PR for 3-2-stable.
I'm newbie at Rails (it's just yesterday when I started learning Rails) so I'd prefer someone to update docs...
Sorry @vijaydev I didn't mean to write docrails back there (probably shouldn't reply on my iphone). I meant to ask what the appropriate flow is in updating master and 3-2, since master needs to be updated as well. Just trying to figure out the preferred workflow.
@osak No problem. I'll take care of it later today unless someone else beats me to it. Thanks again for reporting the issue!
@erichmenge That you can do it in docrails itself. Also, the getting started guide has been rewritten in master and this issue may or may not be there.
Update 'getting started' guides for new whitelist security implementa…
…tion. Closes #6286.