In my current project, there are business and security requirements that prevent certain values from being exposed. I was looking for a way to specify which attributes in a model should be protected. This is what I've come up with and I would love feedback as to whether or not it's a valid solution and how I could improve it.
Basically, I'm following the attr_accessible style and defining an attr_private method for setting specific attributes (or methods) as private. http://codereview.stackexchange.com/questions/16064/protecting-certain-model-attributes-from-being-exposed-in-an-api Your thoughts are much appreciated. Thanks in advance. Jeremy -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/SgLzY2BcotAJ. For more options, visit https://groups.google.com/groups/opt_out.