Class: Redactor2::Generators::ConfigGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



8
9
10
# File 'lib/generators/redactor2/config_generator.rb', line 8

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

Instance Method Details

#create_configObject



12
13
14
# File 'lib/generators/redactor2/config_generator.rb', line 12

def create_config
  template 'config.js', File.join('app/assets/javascripts/redactor2_rails', 'config.js')
end