1
votes

I need to allow users the ability to create lessons, which consist of HTML and form elements. I want them to be able to take advantage of Rails' form helpers and general Ruby code to, for example, decide where and how to display error content. I realize there are security issues with giving them access to execute Ruby code, but I'll have to deal with that later if users will share deployments.

So it seems I should store the ERB files in the database and somehow call them with <%= render content_from_database %>. Is this possible? Will I affect Rails caching in some way?

Using latest Rails with Heroku (no writing to filesystem).

1

1 Answers

1
votes

You should take a look at the Liquid template language

From their tagline:

Ruby library for rendering safe templates which cannot affect the security of the server they are rendered on.