Skip to content

Instantly share code, notes, and snippets.

@trekdemo
Last active December 11, 2015 04:58
Show Gist options
  • Save trekdemo/4548684 to your computer and use it in GitHub Desktop.
Save trekdemo/4548684 to your computer and use it in GitHub Desktop.
Override rails 3.0.17 partial rendering to get information about the partial we render
# Override rails 3.0.17 partial rendering to get information
# about the partial we render
# put it into config/initializers/rendering.rb
module ActionView
module Rendering
def _render_partial(options, &block)
"<b style='float:left;' title='h#{CGI::escapeHTML options.inspect.html_safe}'>*</b>".html_safe +
super
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment