Class: Suspenders::AnalyticsGenerator
Instance Method Summary
collapse
default_source_root
Methods included from Actions
#action_mailer_asset_host, #action_mailer_host, #configure_environment, #expand_json, #replace_in_file
Instance Method Details
#install_partial ⇒ Object
5
6
7
8
|
# File 'lib/suspenders/generators/analytics_generator.rb', line 5
def install_partial
copy_file "_analytics.html.erb",
"app/views/application/_analytics.html.erb"
end
|
#render_partial ⇒ Object
10
11
12
13
14
15
16
|
# File 'lib/suspenders/generators/analytics_generator.rb', line 10
def render_partial
if File.exist?(js_partial)
inject_into_file js_partial,
%{\n\n<%= render "analytics" %>},
after: "<%= yield :javascript %>"
end
end
|