Sha256: fbec5db5018a3736ae5d6cc708342f781859a77f0c51845c9e5d2d872dbca2ec
Contents?: true
Size: 731 Bytes
Versions: 5
Compression:
Stored size: 731 Bytes
Contents
require 'rails/generators' class TandemGenerator < Rails::Generators::Base desc "This generator sets up tandem." def self.source_root @source_root ||= File.join(File.dirname(__FILE__), 'templates') end def create_initializer_file initializer 'tandem.rb', File.open(File.join(self.class.source_root,'initializer.rb'), 'rb') { |f| f.read } end def add_mounting_route route('mount Tandem::Engine => "/"') end def import_migrations rake("tandem:install:migrations") end def inject_tandem_assets append_to_file 'app/assets/javascripts/application.js', '//= require tandem' insert_into_file 'app/assets/stylesheets/application.css', " *= require tandem\n", :before => /^\*\/$/ end end
Version data entries
5 entries across 5 versions & 1 rubygems