Skip to content

Instantly share code, notes, and snippets.

@clyfe
Last active December 24, 2015 01:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clyfe/6727227 to your computer and use it in GitHub Desktop.
Save clyfe/6727227 to your computer and use it in GitHub Desktop.
View context
class Template < ActionView::Base
include ApplicationHelper
def initialize; super(ActionController::Base.view_paths) end
end
tmpl = Template.new()
tmpl.render(template: "foos/foo", layout: 'layouts/bar')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment