Sha256: ab571dfd1313c3380278e7a96d3ea5fe18f3d4112622feee0293c60eb4ffa310
Contents?: true
Size: 455 Bytes
Versions: 2
Compression:
Stored size: 455 Bytes
Contents
module PartiallyUseful module PartialRenderer def self.included(klass) klass.send :alias_method, :original_rails_render, :render klass.send :remove_method, :render end def render(context, options, block) msg = "rendering '#{options[:partial]}' with locals '#{(options[:locals] || {}).keys}'" "<!-- start #{msg}-->\n#{original_rails_render(context, options, block)}\n<!-- end #{msg}-->\n".html_safe end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
partially_useful-0.1.1 | lib/partially_useful/partial_renderer.rb |
partially_useful-0.1.0 | lib/partially_useful/partial_renderer.rb |