Closed oliverhuang closed 12 years ago
Definitely. I'll take a look at it.
-mhw
On Monday, July 16, 2012 at 9:24 PM, 黄冬虹 wrote:
in stache / lib / stache / mustache / handler.rb line 59
The code said that "only rescue NameError/LoadError".
However, I got a 'uninitialized constant Books::Book' error.
book is my model and I have a template called app/templates/books/_book.html.mustache. And I did't define a Books::Book class in app/view/books. The error disappears only when I add a empty definition for Books::Book in app/view/books.
I think when the definition of Books::Book is missing, it should use Stache::Mustache::View instead of raising an exception. Am I right?
I use stache-0.9.1
Reply to this email directly or view it on GitHub: https://github.com/agoragames/stache/issues/19
sorry I made a mistake. When rendering a mustache partial in ERB, I shoud use
<%= render 'books/book', book.attributes.symbolize_keys %>
instead of
<%= render '/books/book', book.attributes.symbolize_keys %>
in stache / lib / stache / mustache / handler.rb line 59
The code said that "only rescue NameError/LoadError".
However, I got a 'uninitialized constant Books::Book' error.
book is my model and I have a template called app/templates/books/_book.html.mustache. And I did't define a Books::Book class in app/view/books. The error disappears only when I add a empty definition for Books::Book in app/view/books.
I think when the definition of Books::Book is missing, it should use Stache::Mustache::View instead of raising an exception. Am I right?
I use stache-0.9.1