After setting blog.new_article_template to "article.erb" in config.rb, I am attempting to use
<%= lorem.paragraphs 10 %>
inside my article template. When attempting to generate a new article, there is a backtrace reading:
(erb):6:in `template': undefined local variable or method `lorem' for #<Middleman::Cli::Article:0x0000010341a790> (NameError)
from /Users/frankwang/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/erb.rb:850:in `eval'
from /Users/frankwang/.rvm/rubies/ruby-2.1.1/lib/ruby/2.1.0/erb.rb:850:in `result'
from /Users/frankwang/.rvm/gems/ruby-2.1.1@midleman/gems/thor-0.19.1/lib/thor/actions/file_manipulation.rb:116:in `block in template'
from /Users/frankwang/.rvm/gems/ruby-2.1.1@midleman/gems/thor-0.19.1/lib/thor/actions/create_file.rb:53:in `call'
from /Users/frankwang/.rvm/gems/ruby-2.1.1@midleman/gems/thor-0.19.1/lib/thor/actions/create_file.rb:53:in `render'
What is a canonical way of including the helper in this situation?
After setting blog.new_article_template to "article.erb" in config.rb, I am attempting to use
inside my article template. When attempting to generate a new article, there is a backtrace reading:
What is a canonical way of including the helper in this situation?