Folks, newbie here and I have a quick question about attr_accessor.
I'm developing a very basic CMS and I set up a simple class for a
user. In that class I use attr_accessor to set up the read, write,
Then in a very basic a controller I create an instance variable @post
= post(:all) and I then render the title of the post along with the
user name in the view. Strangely, the title appears, but the user
name doesn't. BUT, if I remove the attr_accessor in the model the
user name appears just fine. I thought that attr_accessor didn't do
that and that methods like attr_accessible or attr_protected should be
used instead to restrict access to the method.
What's happening here? Do miss understand how attr_accessor works?