Comments (4)
Try:
puts Template.paths
That should give you a list of all compiled templates. I have a feeling that we strip the "templates/" prefix off the template names, but that is due to change for the next release.
from opal-haml.
Yep, already did that. :-) Empty array.
Requiring templates individually works fine using the Ruby require
, but using the Sprockets require_tree
doesn't. Could this actually be an Opal thing and not specific to Opal-Haml?
from opal-haml.
Are you running from git? Or a gem release? And which versions? For 0.7 we introduce out own require_tree method, but that is only in the beta gems
from opal-haml.
Ah! Okay, I tried both 0.6 and the latest 0.7 beta. require_tree
didn't work in 0.6 as a Ruby method, so I guess I didn't even think to try it in 0.7. It seems it works like a charm!
Most of the opal-haml
stuff I've been doing is based on the opal-todos
project, which requires templates individually. Once 0.7 final is out, I might put in a PR on opal-todos
to update that. :-)
from opal-haml.
Related Issues (7)
- Passing url in JSON crashing rendering
- with Rails - Template['myTemplate'] => nilClass HOT 2
- Uncaught NoMethodError: undefined method `buffer' for #<Template::OutputBuffer:77> HOT 2
- template files with `haml` extension not found
- Require does not work on *.haml files on Windows HOT 2
- Are dynamic attributes working? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opal-haml.