Credit to devdocs.io

rails 4.1