Credit to devdocs.io

rails 4.2