Build Your Own Flash Messages14:13 with Craig Dennis
What do you do when your micro-framework doesn't provide a feature you need? You build it!
Flash message CSS
padding: 10px 20px;
One way you to get around the duplication is by taking advantage of the request.attributes and creating a model object in a global before filter. That would allow you to do whatever injecting of the model that was common to all requests. In the controller you just then pull out request.attributes[“model”] and add specific information, but it would have the flash message.
You need to sign up for Treehouse in order to download course files.Sign up