Sha256: 43f502bb4185bc1a11b6014780e1bcc9ddaffbf1025f609be91750523945c93e
Contents?: true
Size: 514 Bytes
Versions: 4
Compression:
Stored size: 514 Bytes
Contents
require_relative "base" module Suspenders 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