I am using Ruby on Rails 3 and I would like to move some custom and shared code in a module.
- What syntax should I use to write the module code?
 - In which folder of my application I have to place the module file?
 - How I have to include that module in one or more controller classes?
 - What other action, if any, do I have to use the custom module anywhere in my application?
 - How can I call methods in the module from my application?