```ruby
module Modular
  module MstRendering
    def render
      path = Rails.root + "app/views/components/#{type}.mst"
      template = File.open(path, "rb").read

      Mustache.render(template, @attributes).html_safe
    end
  end
end```

Rewrite some mustache-specific code to make contextual includes work
user
```ruby
module Modular
  class Template < ::Mustache
  end

  module MstRendering
    def render
      Template.template_path = Rails.root + "app/views/components"
      Template.template_extension = 'mst'
      Template.render_file("./#{type}", @attributes).html_safe
    end
  end
end```
assistant