Hey guys, I've got a rails app using Knockout.js and Path.js to do the UI, so all the HTML is built as separate HTML fragments that are dynamically downloaded by the browser and applied using JQuery templating. I LOVE haml and want to use it to write these templates, but I have no need for inline ruby or access to the controller and would prefer not to have to build routes just to serve them. Is there a way to use HAML outside of views, in the assets folder or the public folder that wouldn't require me defining separate routes, but will still allow me to use it in development while deploying the generated HTML to production? I know this could be a question for the HAML group but I have a feeling it may have something to do with a configuration of the asset pipeline. I'm using 3.1 RC6. Thanks in advance, Jayme
on 2011-08-24 11:40
on 2011-08-24 15:46
On Wed, Aug 24, 2011 at 12:35 AM, Jayme Edwards <firstname.lastname@example.org>wrote: > HTML to production? I know this could be a question for the HAML group but I > have a feeling it may have something to do with a configuration of the asset > pipeline. I'm using 3.1 RC6. > > I believe haml install an haml executable which you can use to convert haml files to html. You might want to check that out if that suits your needs :) > To unsubscribe from this group, send email to > email@example.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > --
on 2011-08-25 15:49
Any advice on how to hook this into the asset pipeline so it executes whenever I update files?
on 2011-08-28 02:17
On Thu, Aug 25, 2011 at 9:48 PM, Jayme Edwards <firstname.lastname@example.org>wrote: > > Any advice on how to hook this into the asset pipeline so it executes > whenever I update files? Sorry I don't get what you mean. From what I understand of your requirements, you want to convert haml to html without rails doing it for you. if that's the case, then i think you can use the haml executable that comes with the gem. But I think you need to require files so that you can use the rails helpers. > http://groups.google.com/group/rubyonrails-talk?hl=en. > --
on 2013-02-17 14:56
Jayme, that's exactly what I'm looking for right now. Well it's been more than a year since you've posted the issue so have you succeeded? I want to use Slim template files inside app/assets/templates folder. I'm implementing the front-end of an app using AngularJS. The Slim file is indeed loaded, but not handled by the Slim template handler. It's curious that .erb files inside the assets folder work. That should be because you can indeed use .erb with CSS and JS files. I've googled around, looked at rails sources etc, but couldn't figure out how to do that. Anyone has a solution?