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

fix uninitialized constant Tilt::HandlebarsTemplate::Pathname #1

Merged
merged 1 commit into from
Apr 28, 2014

Conversation

defeated
Copy link
Contributor

using a partial that has not already been registered raising the "uninitialized constant Tilt::HandlebarsTemplate::Pathname" error.

require 'tilt/handlebars'
tmpl = Tilt.new 'hello.hbs'
puts tmpl.render name: 'railsconf'

templates:

hello.hbs template:

{{> header}}

hello {{name}}!

header.hbs partial:

<h1>HEADING</h1>

using a partial that has not already been registered raising the
"uninitialized constant Tilt::HandlebarsTemplate::Pathname" error.
@jimothyGator jimothyGator self-assigned this Apr 24, 2014
@jimothyGator
Copy link
Collaborator

Thanks for the patch. I'll merge it in this weekend. Would it be possible for you to add a test case (ideally using Minitest::Spec or simply Minitest)? If not, I'll work on that.

@defeated
Copy link
Contributor Author

I tried, but it looks like this existing test already covers my use case, but something else must be requiring pathname from the std lib, masking the issue from my minimal case (above)?

https://github.com/jimothyGator/tilt-handlebars/blob/develop/test/tilt_handlebarstemplate_test.rb#L232-L235

@defeated
Copy link
Contributor Author

For posterity, I'm on OS X Mavericks using Ruby 2.1.1 -

★ ruby -v
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-darwin13.0]

@jimothyGator jimothyGator merged commit 911b0f7 into gi:develop Apr 28, 2014
@jimothyGator
Copy link
Collaborator

Version 1.3.1 is now available on Rubygems.org.

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.

2 participants