Class: Ckeditor::BaseGenerator

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



6
7
8
# File 'lib/generators/ckeditor/base/base_generator.rb', line 6

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

Instance Method Details

#copy_initializerObject

copy configuration



11
12
13
# File 'lib/generators/ckeditor/base/base_generator.rb', line 11

def copy_initializer
  template "ckeditor.rb", "config/initializers/ckeditor.rb"
end

#install_ckeditorObject

copy ckeditor files



16
17
18
# File 'lib/generators/ckeditor/base/base_generator.rb', line 16

def install_ckeditor
  directory "ckeditor", "public/javascripts/ckeditor"
end