Robin Cua wrote: > Hi, what are the differences between Collection, Method and Action? > How to call each?
Collection: An array of objects, resources, etc. Method: A "function" that is scoped within a class or object instance in an Object Oriented Program (OOP). Action: A "special" method that is defined in a controller object in a Model-View-Controller design. The action is no different in reality from any other method. It's only differentiated by how, and where, it is used. Controller objects have methods. Some of these methods are referred to as "actions" because they are typically called as a result of some "event." In a web application that typically means the event is an HTTP request. The duty of the action method is to process the request by sending messages to the model and view objects to generate an HTTP response. The response body can be HTML, JavaScript, PDF (or any other binary file), RSS/ATOM, etc. -- 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 [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

