Sha256: 32838a28c6948c36d879c42d59affcf92abfa701e045ce965ec604e9d70c4ee3
Contents?: true
Size: 1.09 KB
Versions: 1
Compression:
Stored size: 1.09 KB
Contents
module Bootstrap module Generators class InstallGenerator < Rails::Generators::Base source_root File.expand_path("../../templates", __FILE__) desc "Update files needed for bootstrap2-rails" def install # Insert lines in application.js inject_into_file "app/assets/javascripts/application.js", "//= require bootstrap\n//= require jquery.toastmessage\n", :before => "//= require_tree" # Insert lines in application.css inject_into_file "app/assets/stylesheets/application.css", " *= require bootstrap\n *= require jquery.toastmessage\n", :before => "*= require_self" # Insert lines in application.html.erb inject_into_file "app/views/layouts/application.html.erb", "<%= menu_bar %>\n\n<div class='container-fluid' style='padding-top: 45px'>\n <% flash.each do |name, msg| %>\n <%= display_toast_message(msg, name) %>\n <% end %>\n ", :before => "<%= yield %>" inject_into_file "app/views/layouts/application.html.erb", "\n</div>", :after => "<%= yield %>" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bootstrap2-rails-0.0.7 | lib/generators/bootstrap/install_generator.rb |