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=%22attr_accessible%22+%22attr_reader%22 ), so I ask here. When should I use atr_accessible and when attr_reader? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 4/29/07, running idiot <running.cz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > 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=%22attr_accessible%22+%22attr_reader%22 > ), so I ask here. > > When should I use atr_accessible and when attr_reader?attr_reader and attr_accessor are ruby methods: http://ruby-doc.org/core/classes/Module.html#M001702 http://ruby-doc.org/core/classes/Module.html#M001703 attr_accessible and attr_protected are for ActiveRecord only: http://rails.rubyonrails.org/classes/ActiveRecord/Base.html#M001006 -- Rick Olson http://lighthouseapp.com http://weblog.techno-weenie.net http://mephistoblog.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 :) Thanks anyway! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---