Mixins in Ruby

MIXIN: Mixin is a class that is mixed with a module. In other words the implementation of the class and module are joined, intertwined, combined, etc. A mixin is a different mechanism to the extend construct used to add concrete implementation to a class. With a mixin you can extend from a module instead of a class. MODULES: Module is a degenerate abstract class. A module can’t be instantiated and no class can directly extend it but a module can fully implement methods. A class can leverage the implementation of a module by including the module’s methods. A

Simple way to highlight your links based on your current page

Purpose When you traverse between pages of website, you have a link to indicate the current page you are on. So dynamically finding which links is to be set active is done by the below article. Please read the article below for better understanding. There are many primitive ways of doing it but this seems correct as its DRY and KIS. Article Link highlight-link-based-on-current-page-in-rails