attr_accessible vs. attr_reader

I got another question - what is difference between attr_accessible and attr_reader?

I am not too smart from google's results ( http://www.google.com/search?q="attr_accessible"+"attr_reader" ), so I ask here.

When should I use atr_accessible and when attr_reader?

attr_reader and attr_accessor are ruby methods:

attr_accessible and attr_protected are for ActiveRecord only:

http://rails.rubyonrails.org/classes/ActiveRecord/Base.html#M001006

well, thank you. I understand these four models _theoretically_, but in fact it works quite strange and is quite chaotic. Or I have mistakes in different places, but I don't want to fill this list with useless pieces of my not-working code :slight_smile:

Thanks anyway!