Class: Generators::KonsiergeNotifier

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



10
11
12
# File 'lib/generators/install/konsierge_notifier.rb', line 10

def self.source_root
  @source_root ||= File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
end

Instance Method Details

#copy_initializerObject



16
17
18
19
20
21
22
# File 'lib/generators/install/konsierge_notifier.rb', line 16

def copy_initializer
  template 'konsierge_notifier.rb', 'config/initializers/konsierge_notifier.rb'

  # Code to copy the message and error_message erb templates
  copy_file 'message_template.html.erb', 'lib/templates/konsierge_notifier/message.html.erb'
  copy_file 'error_template.html.erb', 'lib/templates/konsierge_notifier/error.html.erb'
end