Hello I was reviewing some rails code lately and I see that in some cases they use private methods (especially in application controller methods). I understand that it is considered a good practice since the methods aren't used anywhere else outside of application controller, but my question is:
What would happened if you never use private methods? Will it be some security issue (and if yes, I'd like to see an example if it is possible), is it just a good practice just to use methods inside the scope of the class that it's been used or is there any gains in resources because there is narrower scope? It might sound pretty newbie question but I am fairly new to OOP and I'd like some guidance in this topics (even from some book or resource about stuff like that). Thank you (I show a debate lately if there are any real advantages of OOP over procedural programming and if OOP is just a myth and I am thinking this a lot lately, so I decided to learn more about OOP and decide for myself... I was also wondering if ruby and rails could be done with procedural programming, instead of classes use functions and what it couldn't be done so easily). -- 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.