Class: BakliteGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/baklite_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_initializer_fileObject



3
4
5
6
7
8
9
10
# File 'lib/generators/baklite_generator.rb', line 3

def create_initializer_file
  create_file 'config/initializers/baklite.rb', <<~RUBY
    Rails::Baklite.configure do |config|
      config.token = Rails.application.credentials.baklite[:token]
      config.name = Rails.application.class.module_parent_name
    end
  RUBY
end