Sha256: 4dff3676d0538a27f74e988c69cafb9b0eae34ba4cf6b3091bb1b627f30fd33f

Contents?: true

Size: 550 Bytes

Versions: 17

Compression:

Stored size: 550 Bytes

Contents

module PlaidRails
  class InstallGenerator < Rails::Generators::Base
    source_root File.expand_path('../templates', __FILE__)

    def install_initializer
      initializer 'plaid.rb', File.read(File.expand_path('../templates/initializer.rb', __FILE__))
    end
    def install_js
      inject_into_file 'app/assets/javascripts/application.js', after: "//= require jquery\n" do <<-'JS'
//= require plaid_rails
        JS
      end
    end
    def install_route
      route "mount PlaidRails::Engine => '/plaid', as: :plaid_rails"
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
plaid_rails-0.13.0 lib/generators/plaid_rails/install_generator.rb
plaid_rails-0.12.0 lib/generators/plaid_rails/install_generator.rb
plaid_rails-0.11.0 lib/generators/plaid_rails/install_generator.rb
plaid_rails-0.10.0 lib/generators/plaid_rails/install_generator.rb
plaid_rails-0.9.0 lib/generators/plaid_rails/install_generator.rb
plaid_rails-0.8.0 lib/generators/plaid_rails/install_generator.rb
plaid_rails-0.7.0 lib/generators/plaid_rails/install_generator.rb
plaid_rails-0.6.0 lib/generators/plaid_rails/install_generator.rb
plaid_rails-0.5.0 lib/generators/plaid_rails/install_generator.rb
plaid_rails-0.4.0 lib/generators/plaid_rails/install_generator.rb
plaid_rails-0.3.0 lib/generators/plaid_rails/install_generator.rb
plaid_rails-0.2.3 lib/generators/plaid_rails/install_generator.rb
plaid_rails-0.2.2 lib/generators/plaid_rails/install_generator.rb
plaid_rails-0.2.0 lib/generators/plaid_rails/install_generator.rb
plaid_rails-0.1.1 lib/generators/plaid_rails/install_generator.rb
plaid_rails-0.1.0 lib/generators/plaid_rails/install_generator.rb
plaid_rails-0.0.2 lib/generators/plaid_rails/install_generator.rb