Hi all I like to make all my model''s attributes not accessible by default so they are safe. But now I needed more than an hour to track a bug down to the fact, that a new attribute has not been set to accessible yet, so I thought about how I could inform me in development mode when a parameter for a model is sent by a form that is meant for a not accessible attribute. So I need some way to determine if an attribute is accessible or not... How can I do this? Thanks Josh -- Posted via http://www.ruby-forum.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 -~----------~----~----~----~------~----~------~--~---
Joshua Muheim wrote:> Hi all > > I like to make all my model''s attributes not accessible by default so > they are safe. > But now I needed more than an hour to track a bug down to the fact, that > a new attribute has not been set to accessible yet, so I thought about > how I could inform me in development mode when a parameter for a model > is sent by a form that is meant for a not accessible attribute. > > So I need some way to determine if an attribute is accessible or not... > How can I do this? > > Thanks > Joshyou make array of attributes which form can get access to. then you use mail to inform you whenever a attribute is trying to connect which have no access :) Understand what I mean? -- Posted via http://www.ruby-forum.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 -~----------~----~----~----~------~----~------~--~---