Skip to content

Instantly share code, notes, and snippets.

@ken1flan
Created November 26, 2015 22:57
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 ken1flan/1f65b9d16d288c39f33e to your computer and use it in GitHub Desktop.
Save ken1flan/1f65b9d16d288c39f33e to your computer and use it in GitHub Desktop.
Using kittenizer in Rails
module ActionView
class Template
def render(view, locals, buffer=nil, &block)
@source.gsub!(/$/, "にゃ")
instrument("!render_template") do
compile!(view)
view.send(method_name, locals, buffer, &block)
end
rescue => e
handle_render_error(view, e)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment