Class: Doorkeeper::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/doorkeeper/install_generator.rb

Overview

Setup doorkeeper into Rails application: locales, routes, etc.

Instance Method Summary collapse

Instance Method Details

#installObject



14
15
16
17
18
19
20
# File 'lib/generators/doorkeeper/install_generator.rb', line 14

def install
  template "initializer.rb", "config/initializers/doorkeeper.rb"
  copy_file File.expand_path("../../../config/locales/en.yml", __dir__),
            "config/locales/doorkeeper.en.yml"
  route "use_doorkeeper"
  readme "README"
end