Sha256: 0242f907535a5007f1336d97214f45008cc143c0edc07945e4726da405a92218
Contents?: true
Size: 513 Bytes
Versions: 4
Compression:
Stored size: 513 Bytes
Contents
require_relative "base" module Bulldozer class AnalyticsGenerator < Generators::Base def install_partial copy_file "_analytics.html.erb", "app/views/application/_analytics.html.erb" end def render_partial if File.exist?(js_partial) inject_into_file js_partial, %{\n\n<%= render "analytics" %>}, after: "<%= yield :javascript %>" end end private def js_partial "app/views/application/_javascript.html.erb" end end end
Version data entries
4 entries across 4 versions & 1 rubygems