Last active
February 21, 2020 23:55
-
-
Save tenderlove/b45a82cd920e368cfdf3e6164c5dadf0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/erb | |
<%= yield %> | |
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
require "action_controller" | |
require "action_view" | |
class TestController < ActionController::Base | |
self.view_paths = "." | |
def _prefixes; []; end # Search the current directory rather than "test/" | |
end | |
cv = TestController.new.view_context | |
puts cv.render("thing") { "<%= yield %>".html_safe } | |
# vim: ft=ruby |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment