Class: BrowserWarning::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/browser_warning/warning.rb

Instance Method Summary collapse

Instance Method Details

#insert_appilicationObject



4
5
6
7
8
9
# File 'lib/browser_warning/warning.rb', line 4

def insert_appilication
insert_into_file "app/views/layouts/application.html.erb", "<link rel='stylesheet' href='http://outdatedbrowser.com/public/scripts/outdatedBrowser.min.css'>\n", :after => "<head>\n"
insert_into_file "app/views/layouts/application.html.erb", "<script href='$( document ).ready(function() {\noutdatedBrowser({\nbgColor: '#f25648',\ncolor: '#ffffff',\nlowerThan: 'transform',\nlanguagePath: 'your_path/outdatedbrowser/lang/en.html'\n})\n})", :before => "</body>\n"
insert_into_file "app/views/layouts/application.html.erb", "<script href='http://outdatedbrowser.com/public/scripts/outdatedbrowser.min.js'></script>\n", :before => "</body>\n\n"
insert_into_file "app/views/layouts/application.html.erb", "<div id='outdated'></div>\n", :before => "</body>\n"
end