Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make partials work in Alephant #41

Open
Guntrisoft opened this issue Feb 18, 2014 · 3 comments
Open

Make partials work in Alephant #41

Guntrisoft opened this issue Feb 18, 2014 · 3 comments

Comments

@Guntrisoft
Copy link
Contributor

We'd like to include common mustache templates using mustache partials.

Currently by default it will look for partials in the current directory, but as we have different queues in the election data renderer project it's not possible to store them in the same directory.

We have got around this issue by setting the following in our view model:

self.template_path = File.dirname(__FILE__) + '/../../lib/templates/'

It would be nice for this to be set somewhere in Alephant::Views::Base - however the only caveat with that, is that '/../../lib/templates/' is very specific to the election data renderer project.

Perhaps we can call a static method on Alephant::Views::Base from the election data renderer project which sets a path for partials?

@Integralist
Copy link
Contributor

I vote for class level (static) method which will allow you to set this value.

@kenoir
Copy link
Contributor

kenoir commented Jan 23, 2015

I'll get round to this any day now ...

@Guntrisoft
Copy link
Contributor Author

@kenoir glad to hear it, I've been waiting all this time ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants