On Dec 21, 12:20 pm, kp <pariharkirt...@gmail.com> wrote: > I m new to ruby language. difference between att_accesor and > attr_accessible is not clear to me. >
They're almost completely unrelated. attr_accessor is part of ruby itself and is equivalent to calling attr_writer and attr_reader for the same argument(s), ie it creates accessor methods for you attr_accessible is a rails thing and is part of rails' mass assignment protection (along with attr_protected). It allows you to setup a whitelist of attributes that can be mass-assigned (as opposed to attr_protected, which sets up a blacklist) so that users can't set important attributes they're not supposed to be able to set just by manipulating the form data that is posted Fred > thanks for your kind help. > kp > (india) -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.