mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-06-13 22:45:01 +08:00
19 lines
324 B
Ruby
Vendored
19 lines
324 B
Ruby
Vendored
require_relative "template_support"
|
|
|
|
module Onebox
|
|
class View < Mustache
|
|
include TemplateSupport
|
|
|
|
attr_reader :record
|
|
|
|
def initialize(name, record)
|
|
@record = record
|
|
self.template_name = name
|
|
self.template_path = load_paths.last
|
|
end
|
|
|
|
def to_html
|
|
render(record)
|
|
end
|
|
end
|
|
end
|