I want to parse a haml template to a variable using HAML::Engine inside a model.
Where in the rails app folder structure should I store my files (one for each template) and how can I call them as a string in the model?
Thanks
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.
Using what Sameera stated, by configuring your app to load directories, I would probably put it in a new folder in the ‘lib’ directory.
You can then have your rails app to load everything in ‘lib’ by putting this in your application.rb file.