I am trying to create a template system that is somewhat similar to liquid, but easy to use and less flexible / powerful.
Is there a way to render some inline content from the controller so that it also implements the erb file of the layout file ? So that I can visualize some kind of user-generated content and is it inserted into the main theme of the application?
The only way I can think of now is to simply add a single line file to the view file, which displays inline content, but this causes other problems.
If user content is stored in db, I want to display this inline (from the controller) in the layout, but only if there is user content, otherwise I just want to display a regular view file.
Any ideas would be greatly appreciated!
source share