Module: Cucover::Rails

Defined in:
lib/cucover/rails.rb

Defined Under Namespace

Modules: RecordsRenders

Class Method Summary collapse

Class Method Details

.patch_if_necessaryObject



4
5
6
7
8
9
10
11
12
# File 'lib/cucover/rails.rb', line 4

def patch_if_necessary
  return if @patched
  return unless defined?(ActionView)

  Monkey.extend_every ActionView::Base => Cucover::Rails::RecordsRenders
  # Monkey.extend_every ActionView::Template => Cucover::Rails::RecordsRenders # TODO: patch nicer template
  
  @patched = true
end