'erb' is relative to the html directory
This commit is contained in:
parent
4850546eb1
commit
88630bae1b
2 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
|||
module Mixin::ERB
|
||||
def erb(partial, local_assigns = {})
|
||||
erb = File.binread File.join(Dir.getwd, "src", "html", "partials", partial)
|
||||
def erb(path, local_assigns = {})
|
||||
erb = File.binread File.join(Dir.getwd, "src", "html", path)
|
||||
scope = binding
|
||||
local_assigns.each { scope.local_variable_set(_1, _2) }
|
||||
::ERB.new(erb).result(scope)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
module Mixin::OpenGraph
|
||||
def opengraph(context)
|
||||
erb "opengraph.html.erb", local_assigns(context)
|
||||
erb "partials/opengraph.html.erb", local_assigns(context)
|
||||
end
|
||||
|
||||
def local_assigns(context)
|
||||
|
|
Loading…
Reference in a new issue