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 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/aPQ4fuJ44CYJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Wed, Aug 24, 2011 at 12:35 AM, Jayme Edwards <jayme.edwards-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>wrote:> 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. > >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 :)> Thanks in advance, > > Jayme > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-talk/-/aPQ4fuJ44CYJ. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- ------------------------------------------------------------- visit my blog at http://jimlabs.heroku.com -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Any advice on how to hook this into the asset pipeline so it executes whenever I update files? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/MQgIG70FDRAJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Thu, Aug 25, 2011 at 9:48 PM, Jayme Edwards <jayme.edwards-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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.> -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To view this discussion on the web visit > https://groups.google.com/d/msg/rubyonrails-talk/-/MQgIG70FDRAJ. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. >-- ------------------------------------------------------------- visit my blog at http://jimlabs.heroku.com -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/LHszOVmSmcAJ. For more options, visit https://groups.google.com/groups/opt_out.