Is it possible to store erb templates in database? How?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Sure it is.
But I think, this is not the best solution if you only need some pages with same layout and different content.
If you really want ERBs saved in database, create some model with your ERBs saved in. Then you can call in controller code like this, to render that ERB.
Watch ERB.new parameters.