I see what you are saying but question that by storing erb templates in the DB would eventually become less flexible at some point in the future??
I can see why it could and why it couldn't... Would not using partials separated into directories by namespace's not work? I guess this depends on how many templates you are looking at..., have you tried a protoype of a db driven one? What were your results? You could always have the DB output to files in the rails system on demand? Maybe you write a model that doesn't write to DB but instead outputs to create the ERB files in the rails application's view folder... Sorry maybe not so much help, but if it was me I would try the last option... I would also try and avoid the need for this as much as possible by good usage of layouts and css which I am currently using on a CMS system... On Mar 19, 2:24 am, fredd <[email protected]> wrote: > Hi, I am currently developing a small cms in Rails. I decided recently > that I need to store both the content and the presentation template in > the database for flexibility. The system is based heavily on content > blocks and I need different templates for the same content block in > different contexts. Anyone has a good advice on how to solve that > technically? I now how to render a erb template inline, but how do I > solve things like protecting some methods on objects like "destroy" > and so on. I have looked into other template languages that offer some > degree of protection like Radius and Liquid, but I like the fact that > ERB is bundled with Ruby and Rails already uses it, why reinvent the > wheel. > > Cheers > Fredrik --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

