Text fields and Templating in Rails
I have a rails 3 app and a weird problem that I'm having a lot of trouble working through. I have a form with three fields: Title (Text Field), Lead in (Text Area), Body (Text Area), Kicker(Text Area). I'd like to compile them into a an "Article" via a template of some sort. The template would look something like this:
<b> [Title] </b>
<p> [Lead In] </p>
<p> [body] </p>
<p> [Kicker] </p>开发者_如何学JAVA;
This would be fine if it was static. But I'd like to be able to offer multiple templates, and I'd like to autocreate forms based on those templates. Is there something out there already that is a solution to this templating problem? If not, any first steps would be way helpful.
Thanks!
https://github.com/defunkt/mustache
That is a pretty nifty templating tool to use.
精彩评论