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

Allow for multiple template paths #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cowboyd
Copy link

@cowboyd cowboyd commented Feb 22, 2011

For frameworks like cells that don't use standard template paths, I've added the ability to search multiple paths for your mustache templates. The array of search paths is stored in Mustache::Rails::Config.template_paths and the current template_base_path is always the first entry in this array.

That way, you can do things like this:

Mustache::Rails::Config.template_paths << "app/cells"

I also changed it to raise a MissingTemplate if the mustache file could not be found rather than Errno::ENOENT which what it's currently doing.

thanks for a great plugin!

cheers,
Charles

@jocubeit
Copy link

Nice. Would love to see this merged.

@myobie
Copy link

myobie commented Dec 1, 2011

+1 on getting this merged

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

Successfully merging this pull request may close these issues.

3 participants